/// <summary> /// 注册SqlServer工作单元服务 /// </summary> /// <typeparam name="TService">工作单元接口类型</typeparam> /// <typeparam name="TImplementation">工作单元实现类型</typeparam> /// <param name="services">服务集合</param> /// <param name="connection">连接字符串你</param> /// <param name="level">日志级别</param> /// <returns></returns> public static IServiceCollection AddSqlServerUnitOfWork <TService, TImplementation>( this IServiceCollection services, string connection, DataLogLevel level = DataLogLevel.Sql) where TService : class, IUnitOfWork where TImplementation : UnitOfWorkBase, TService { return(services.AddUnitOfWork <TService, TImplementation>(builder => { builder.UseSqlServer(connection); }, config => config.LogLevel = level)); }
internal Executor(ILogger logger, bool suppressCacheExceptions, DataLogLevel dataLogLevel) { _logger = logger; _logSensitive = dataLogLevel == DataLogLevel.Sensitive; _suppressCacheExceptions = suppressCacheExceptions; }