34 lines
857 B
C#
34 lines
857 B
C#
using Microsoft.Practices.Unity;
|
|
using SqlSugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using MyCode.Project.Domain.Config;
|
|
using MyCode.Project.Infrastructure.Cache;
|
|
|
|
namespace MyCode.Project.Repositories.Common
|
|
{
|
|
|
|
public class WMSSqlSugarClient : SqlSugar.SqlSugarClient
|
|
{
|
|
|
|
public WMSSqlSugarClient() : base(config)
|
|
{
|
|
|
|
}
|
|
|
|
private static ConnectionConfig config = new ConnectionConfig()
|
|
{
|
|
ConnectionString = SystemConfig.WMSConnectionStr,
|
|
DbType = DbType.SqlServer,
|
|
InitKeyType = InitKeyType.Attribute,
|
|
IsAutoCloseConnection = true,
|
|
ConfigureExternalServices = new ConfigureExternalServices()
|
|
{
|
|
DataInfoCacheService = new HttpRuntimeCache()
|
|
}
|
|
|
|
};
|
|
}
|
|
}
|