333
This commit is contained in:
28
MyCode.Project.Repositories/Common/MyCodeSqlSugarClient.cs
Normal file
28
MyCode.Project.Repositories/Common/MyCodeSqlSugarClient.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Microsoft.Practices.Unity;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using MyCode.Project.Domain.Config;
|
||||
|
||||
namespace MyCode.Project.Repositories.Common
|
||||
{
|
||||
|
||||
public class MyCodeSqlSugarClient : SqlSugar.SqlSugarClient
|
||||
{
|
||||
|
||||
public MyCodeSqlSugarClient() : base(config)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static ConnectionConfig config = new ConnectionConfig()
|
||||
{
|
||||
ConnectionString = SystemConfig.ConnectionMasterStr,
|
||||
DbType = DbType.SqlServer,
|
||||
InitKeyType = InitKeyType.Attribute,
|
||||
IsAutoCloseConnection = true
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user