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 LxmSqlSugarClient : SqlSugar.SqlSugarClient { public LxmSqlSugarClient() : base(config) { } private static ConnectionConfig config = new ConnectionConfig() { ConnectionString = SystemConfig.LxmConnectionStr, DbType = DbType.SqlServer, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, ConfigureExternalServices = new ConfigureExternalServices() { DataInfoCacheService = new HttpRuntimeCache() } }; } }