public Base_UserStorBusiness(IDbAccessor db, Cache.IBase_UserCache userCache, IServiceProvider serviceProvider, IMapper mapper) : base(db) { _serviceProvider = serviceProvider; _userCache = userCache; _mapper = mapper; }
public IConfigInit UseDatabase <TDbAccessor>(string conString, DatabaseType dbType) where TDbAccessor : class, IDbAccessor { if (ShardingConfig.ServiceDescriptors != null) { ShardingConfig.ServiceDescriptors.AddScoped(_ => { ILoggerFactory loggerFactory = _.GetService <ILoggerFactory>(); IDbAccessor repository = DbFactory.GetDbAccessor(conString, dbType, loggerFactory); if (ShardingConfig.LogicDelete) { repository = new LogicDeleteDbAccessor(repository); } if (typeof(TDbAccessor) == typeof(IDbAccessor)) { return((TDbAccessor)repository); } else { return(repository.ActLike <TDbAccessor>()); } }); } return(this); }
public HomeBusiness(IDbAccessor db, IOperator @operator, IMapper mapper, IBase_UserCache base_UserCache) : base(db) { _operator = @operator; _mapper = mapper; _base_UserCache = base_UserCache; }
public BuildCodeBusiness(IDbAccessor db, IHostEnvironment evn) : base(db) { var projectPath = evn.ContentRootPath; _solutionPath = Directory.GetParent(projectPath).ToString(); }
public SaleProductWareHouseStockService(IDbAccessor omsAccessor, IWorkContext workContext, ILogger <ProductService> logger, ILogService logService, IConfiguration configuration, IOrderService orderService) : base(omsAccessor, workContext, configuration) { _logger = logger; _logService = logService; _orderService = orderService; }
public mini_component_nestedBusiness(IDbAccessor db, IMapper mapper, Operator op, Imini_page_componentBusiness mini_page_componentBusiness) : base(db) { _mapper = mapper; _operator = op; _mini_page_componentBusiness = mini_page_componentBusiness; }
public LogicDeleteDbAccessor(IDbAccessor db, EFCoreShardingOptions shardingOptions) { FullDbAccessor = db; _logicDelete = shardingOptions.LogicDelete; _deletedField = shardingOptions.DeletedField; _keyField = shardingOptions.KeyField; }
public LogicDeleteDbAccessor(IDbAccessor db, IShardingConfig shardingConfig) { FullDbAccessor = db; _logicDelete = shardingConfig.LogicDelete; _deletedField = shardingConfig.DeletedField; _keyField = shardingConfig.KeyField; }
public HomeBusiness(IDbAccessor db, IOperator @operator, IMapper mapper, Imini_project_userBusiness mini_project_userBusiness) : base(db) { _operator = @operator; _mapper = mapper; _mini_project_userBusiness = mini_project_userBusiness; }
public LogicDeleteDbAccessor(IDbAccessor db) { FullDbAccessor = db; _logicDelete = Constant.LogicDelete; _deletedField = Constant.DeletedField; _keyField = Constant.KeyField; }
public void Initialize(string tablePrefix, string schedName, IDbAccessor dbAccessor) { TablePrefix = tablePrefix; SchedName = schedName; DbAccessor = dbAccessor; // No longer required SchedNameLiteral = "'" + schedName + "'"; }
public void Initialize(string tablePrefix, string schedName, IDbAccessor dbAccessor) { TablePrefix = tablePrefix; DbAccessor = dbAccessor; SchedName = schedName; // No longer used in this file SchedNameLiteral = "'" + schedName + "'"; }
public CMBService(IDbAccessor omsAccessor, IWorkContext workContext, ICommonService commonService, IConfiguration configuration, IOrderService orderService , IProductService productService, ILogService logService) : base(omsAccessor, workContext, configuration) { _commonService = commonService; _orderService = orderService; _productService = productService; _logService = logService; }
public void WriteAggregate(IDbAccessor accessor, IDbAggregate aggregate) { if (aggregate == null) { return; } WriteAggregates(accessor, new[] { aggregate }); }
public ExecuteService(IDbAccessor omsAccessor, IWorkContext workContext, IConfiguration configuration, IOrderSyncService orderSyncService, ILogService logService, IProductService productService, ICMBService cmbService) : base(omsAccessor, workContext) { _orderSyncService = orderSyncService; _configuration = configuration; _logService = logService; _productService = productService; _cmbService = cmbService; }
/// <summary> /// 从已加载的数据中获取对应类型的List<>, 如果对应类型不存在, 加载并返回加载后的结果 /// </summary> private IList GetSubItemList(Type type, IDbAccessorFactory dbAcsFty, object key) { ClassDesc clsDesc = GetClassDesc(type); IDbAccessor dbAccessor = dbAcsFty.GetDbAccessor(clsDesc.TableName); IDataReader reader = dbAccessor.Query(GetQueryString(clsDesc.TableName, clsDesc.RootKeyAttribute.ColumnName, key)); IList list = ReadItems(type, reader, clsDesc, dbAcsFty, key); dbAccessor.CloseDbReader(); return(list); }
public StockRemindService(IDbAccessor omsAccessor, IWorkContext context, IDistributedCache cache, IHubContext <HubContext, IHubContext> hubContext, ICommonService common, IStockRemindNotify remindNotify, IConfiguration configuration) { this.omsAccessor = omsAccessor; user = context.CurrentUser; this.cache = cache; this.hubContext = hubContext; this.common = common; this.remindNotify = remindNotify; this.conn = configuration["ConnectionStrings:DefaultConnection"]; }
public OrderSyncService(IDbAccessor omsAccessor, IWorkContext workContext, ICommonService commonService, IOrderService orderService, IServiceProvider serviceProvider, IProductService productService, IDeliveriesService deliveriesService, ILogService logService) : base(omsAccessor, workContext) { _commonService = commonService; _orderService = orderService; _rootProvider = serviceProvider; _productService = productService; _deliveriesService = deliveriesService; _logService = logService; }
public Base_UserBusiness( IDbAccessor db, IBase_UserCache userCache, IOperator @operator, IMapper mapper ) : base(db) { _userCache = userCache; _operator = @operator; _mapper = mapper; }
public Examples() { m_Filename = Path.GetTempFileName(); m_Accessor = DbFactory.CreateAccessor( DbAccessorType.SqLite, AccessorExtension.All, () => new SQLiteConnection(String.Format("Data Source={0};Version=3;New=True", m_Filename)) ); m_Accessor.Execute(CREATE_DATABASE_SCRIPT); //m_Accessor.Log = Console.Out; }
public IDbAccessor GetMapDbAccessor(string conString, DatabaseType dbType, string suffix) { var dbId = GetDbId(conString, dbType, suffix); IDbAccessor db = _dbs.GetOrAdd(dbId, key => _dbFactory.GetDbAccessor(conString, dbType, null, suffix)); if (OpenedTransaction) { _transaction.AddDbAccessor(db); } return(db); }
public CustomerController(ICustomerService customerService, IAuthenticationService authenticationService, ICommonService commonService, IPermissionService permissionService, ISalesManService salesManService, IScheduleTaskFuncService scheduleTaskFuncService, IHostingEnvironment hostingEnvironment, IDbAccessor omsAccessor) { _customerService = customerService; _authenticationsService = authenticationService; _commonService = commonService; _permissionService = permissionService; _salesManService = salesManService; _scheduleTaskFuncService = scheduleTaskFuncService; _hostingEnvironment = hostingEnvironment; _omsAccessor = omsAccessor; }
public HomeBusiness(IDbAccessor db, IOperator @operator, IMapper mapper, Imini_project_userBusiness mini_project_userBusiness, IBase_UserCache userCache, IWorkOrderDbAccessor workOrderDbAccessor, Base_UserBusiness base_UserBusiness) : base(db) { _operator = @operator; _mapper = mapper; _userCache = userCache; _Base_UserBusiness = base_UserBusiness; }
public override void Rule(IDbAccessor omsAccessor, SetDto set) { var templateCodes = set.Key.Select(c => c.TemplateCode).ToList(); var templateCode = omsAccessor.Get <RemindTemplateModel>().Where(c => templateCodes.Any(d => d == c.TemplateCode)).ToList(); templateCode.ForEach(c => { // 标题/提醒库存 不同时,视为更新 if (c.TemplateTitle != set.TemplateTitle || c.RemindStock != set.RemindStock) { c.IsUpdate = true; } }); }
public PurchasingController(IPermissionService permissionService, IPurchasingService purchasingService, IWareHouseService wareHouseService, ICommonService commonService, IProductService productService, ILogService logService, IUserService userService, IScheduleTaskFuncService scheduleTaskFuncService, IDbAccessor omsAccessor , IHostingEnvironment hostingEnvironment) { _permissionService = permissionService; _purchasingService = purchasingService; _wareHouseService = wareHouseService; _commonService = commonService; _productService = productService; _logService = logService; _userService = userService; _scheduleTaskFuncService = scheduleTaskFuncService; _omsAccessor = omsAccessor; _hostingEnvironment = hostingEnvironment; }
public ScheduleTaskFuncService(IDbAccessor omsAccessor, IWorkContext workContext, IConfiguration configuration, IOrderSyncService orderSyncService, ILogService logService, IProductService productService, ICMBService cmbService) : base(omsAccessor, workContext, configuration) { _orderSyncService = orderSyncService; WMSApiUrl = configuration.GetSection("WMSApi")["domain"].ToString(); this._logService = logService; this._productService = productService; _cmbService = cmbService; }
public void WriteAggregates(IDbAccessor accessor, IEnumerable <IDbAggregate> aggregates) { if (aggregates == null || !aggregates.Any()) { return; } var aggregateTypes = aggregates .Where(a => a != null) .ToLookup(a => a.GetType()); foreach (var aggregateType in aggregateTypes) { WriteAggregatesOfSameType(accessor, aggregateType); } }
public CommandProcessor(INotifier notifier, IReportingService service, IDbAccessor dbAccessor, IMailSender mailSender, IPinGenerator pinGenerator, IServiceProvider serviceProvider, IOptions <Config> options) { _notifier = Arg.NotNull(notifier, nameof(notifier)); _service = Arg.NotNull(service, nameof(service)); _config = Arg.NotNull(options.Value, nameof(options)); _dbAccessor = Arg.NotNull(dbAccessor, nameof(dbAccessor)); _mailSender = Arg.NotNull(mailSender, nameof(mailSender)); _pinGenerator = Arg.NotNull(pinGenerator, nameof(pinGenerator)); _serviceProvider = Arg.NotNull(serviceProvider, nameof(serviceProvider)); }
public IDbAccessor GetMapDbAccessor(string conString, DatabaseType dbType, string suffix) { var dbId = GetDbId(conString, dbType, suffix); IDbAccessor db = _dbs.GetOrAdd(dbId, key => _dbFactory.GetDbAccessor(new DbContextParamters { ConnectionString = conString, DbType = dbType, Suffix = suffix })); if (OpenedTransaction) { _transaction.AddDbAccessor(db); } return(db); }
public MainController(IDbAccessor dbAccessor) { _dbAccessor = dbAccessor; IServiceMgr serviceMgr = ServiceMgr.Current; _logMgr = serviceMgr.GetInstance <ILogMgr>(); _logger = _logMgr.GetLogger("Request.MainController"); _dialogMgr = serviceMgr.GetInstance <IViewFormMgr>(); _regionMgr = serviceMgr.GetInstance <IRegionMgr>(); _commonService = serviceMgr.GetInstance <ICommonService>(); _dbMgr = serviceMgr.GetInstance <IDbMgr>(); _eventMgr = serviceMgr.GetInstance <IEventMgr>(); _logger.Debug("Create."); _logger.Debug("Interfaces: IDBMgr = {0}; ICommonDbService = {1}; _dialogMgr = {2}; IRegionMgr = {3}; IEventMgr = {4}.", _dbMgr.ToStateString(), _commonService.ToStateString(), _dialogMgr.ToStateString(), _regionMgr.ToStateString(), _eventMgr.ToStateString()); Init(); }
public MsSqlConfigurationSettingsRepository(IDatabaseConnectionStringProvider databaseConnectionStringProvider) { _dbAccessor = new DbAccessor(databaseConnectionStringProvider); }
public void Initialize(string tablePrefix, string schedName, IDbAccessor dbAccessor) { TablePrefix = tablePrefix; SchedNameLiteral = "'" + schedName + "'"; DbAccessor = dbAccessor; }