Files
YunTongJackYunTask/Reportapi/MyCode.Project.Repositories/Common/WMSSqlSugarClient.cs

34 lines
857 B
C#
Raw Normal View History

2025-07-04 09:50:02 +08:00
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
{
2025-07-12 16:58:00 +08:00
public class WMSSqlSugarClient : SqlSugar.SqlSugarClient
2025-07-04 09:50:02 +08:00
{
2025-07-12 16:58:00 +08:00
public WMSSqlSugarClient() : base(config)
2025-07-04 09:50:02 +08:00
{
}
private static ConnectionConfig config = new ConnectionConfig()
{
2025-07-12 16:58:00 +08:00
ConnectionString = SystemConfig.WMSConnectionStr,
2025-07-04 09:50:02 +08:00
DbType = DbType.SqlServer,
InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true,
ConfigureExternalServices = new ConfigureExternalServices()
{
DataInfoCacheService = new HttpRuntimeCache()
}
};
}
}