public JweBlackListService( IDataBaseFactory dataBaseFactory, IOptionsMonitor <JweOptions> jweOptions) { this.dataBaseFactory = dataBaseFactory; this.jweOptions = jweOptions; }
public ProfilesVisitsCounterService( IDataBaseFactory dbFactory, SpamProtectionCache spamProtectionCache) { this.dbFactory = dbFactory; this.spamProtectionCache = spamProtectionCache; }
//IServiceAnnonce sa = new ServiceAnnonce(uow); public AnnoceController() { dbf = new DataBaseFactory(); uow = new UnitOfWork(dbf); ServiceAnnonce = new ServiceAnnonce(); ServiceClient = new ServiceClient(); }
public ClientController() { dbf = new DataBaseFactory(); uow = new UnitOfWork(dbf); ServiceAnnonce = new Service <Annonce>(uow); ServiceClient = new Service <Client>(uow); }
public MenuCache( IDataBaseFactory dataBaseFactory, IRolesCache rolesCache) { this.dataBaseFactory = dataBaseFactory; this.rolesCache = rolesCache; }
public MaterialsVisitsCounterCache( IDataBaseFactory dbFactory, SpamProtectionCache spamProtectionCache) { this.dbFactory = dbFactory; this.spamProtectionCache = spamProtectionCache; }
public JwtBlackListService( IDataBaseFactory dataBaseFactory, IOptions <JwtOptions> jwtOptions) { this.dataBaseFactory = dataBaseFactory; this.jwtOptions = jwtOptions.Value; }
public static void AddIdentity(this IServiceCollection services, IDataBaseFactory dataBaseFactory) { services.AddIdentity <User, Role>( options => { options.Password.RequireDigit = false; options.Password.RequireLowercase = false; options.Password.RequireNonAlphanumeric = false; options.Password.RequireUppercase = false; options.Password.RequiredUniqueChars = 2; options.Password.RequiredLength = 6; options.User.RequireUniqueEmail = true; const string engChars = "abcdefghijklmnopqrstuvwxyz"; const string rusChars = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя"; const string numbers = "0123456789"; const string other = " -"; options.User.AllowedUserNameCharacters = engChars + engChars.ToUpper() + rusChars + rusChars.ToUpper() + numbers + other; }) .AddLinqToDBStores <int>(dataBaseFactory) .AddUserManager <SunUserManager>() .AddRoleManager <SunRoleManager>() .AddDefaultTokenProviders(); }
public static void AddCiphers(this IServiceCollection services, IDataBaseFactory dbFactory) { CryptService cryptService = new CryptService(dbFactory); cryptService.AddCipherKey(CaptchaService.CypherName); services.AddSingleton <ICryptService>(cryptService); }
public EfRepositoryBase(IDataBaseFactory factory) { if (factory == null) { throw new ArgumentNullException("factory"); } this.DatabaseFactory = factory; _context = _context ?? (_context = DatabaseFactory.Get()); }
public SectionsCache( IDataBaseFactory dataBaseFactory, IRolesCache rolesCache, SectionTypes sectionTypes) { this.rolesCache = rolesCache; this.dataBaseFactory = dataBaseFactory; this.sectionTypes = sectionTypes; Initialize(); }
public CleanCacheJobsService( IDataBaseFactory dbFactory, SpamProtectionCache spamProtectionCache, IOptions <SchedulerOptions> schedulerOptions, JwtBlackListService jwtBlackListService) { this.dbFactory = dbFactory; this.spamProtectionCache = spamProtectionCache; this.jwtBlackListService = jwtBlackListService; this.schedulerOptions = schedulerOptions.Value; }
public OperationKeysContainer(IDataBaseFactory dbFactory) { using DataBaseConnection db = dbFactory.CreateDb(); Dictionary <string, int> dictionary = db.OperationKeys .ToDictionary(x => x.Name, x => x.OperationKeyId); foreach (var propertyInfo in typeof(OperationKeysContainer).GetProperties()) { propertyInfo.SetValue(this, dictionary[propertyInfo.Name]); } }
public DbContext(IDataBaseFactory dataBaseFactory, IMapToNew <Post, Entities.Post> postMapper, IMapToNew <PostSummary, Entities.PostSummary> postSummaryMapper, IMapToNew <Comment, Entities.Comment> commentMapper, IMapToNew <User, Entities.User> userMapper) { this.dataBaseFactory = dataBaseFactory; this.postMapper = postMapper; this.commentMapper = commentMapper; this.userMapper = userMapper; this.postSummaryMapper = postSummaryMapper; }
public BudgetStatistician Statistic(IDataBaseFactory factory) { string sql = string.Format("SELECT sum(TB_Budget.Estimate),sum(Actuality),sum((CASE WHEN Level = '{0}' THEN Actuality ELSE 0 END)) FROM TB_Budget", EnumBudgetState.Signed); using (var db = factory.OpenDefalutDataBase()) { DataSet set = db.ExecuteSqlToDataSet(sql); SumEstimate = onConvertToDouble(set.Tables[0].Rows[0][0].ToString()); FinishEstimate = onConvertToDouble(set.Tables[0].Rows[0][1].ToString()); FinishAcutual = onConvertToDouble(set.Tables[0].Rows[0][2].ToString()); } return(this); }
public CryptService(IDataBaseFactory dbFactory) { this.dbFactory = dbFactory; cipher = new AesManaged { KeySize = 256, BlockSize = 128, Padding = PaddingMode.ISO10126, Mode = CipherMode.CBC }; Initialize(); }
public static IServiceCollection AddDatabase(this IServiceCollection services, IConfiguration configuration, out IDataBaseFactory dataBaseFactory) { LinqToDB.Common.Configuration.Linq.AllowMultipleQuery = true; var dbFactory = DataBaseFactory.DefaultDataBaseFactory; services.AddSingleton <IDataBaseFactory>(dbFactory); services.AddScoped(x => dbFactory.CreateDb()); dataBaseFactory = dbFactory; return(services); }
public CleanCacheJobsService( IDataBaseFactory dbFactory, SpamProtectionCache spamProtectionCache, IOptionsMonitor <SchedulerOptions> schedulerOptions, IMaterialsVisitsCounterCache materialsVisitsCounterCache, IProfilesVisitsCounterService profilesVisitsCounterService, JweBlackListService jweBlackListService) { this.dbFactory = dbFactory; this.spamProtectionCache = spamProtectionCache; this.jweBlackListService = jweBlackListService; this.materialsVisitsCounterCache = materialsVisitsCounterCache; this.profilesVisitsCounterService = profilesVisitsCounterService; this.schedulerOptions = schedulerOptions; }
/// <summary> /// Add Singleton cache services /// </summary> public static void AddCaches(this IServiceCollection services, IDataBaseFactory dataBaseFactory) { services.AddSingleton <IRolesCache>(new RolesCache(dataBaseFactory)); services.AddSingleton <ICategoriesCache, CategoriesCache>(); services.AddSingleton <IMenuCache, MenuCache>(); services.AddSingleton <IComponentsCache, ComponentsCache>(); services.AddSingleton <IContentCache, CategoryContentCache>(); services.AddSingleton <CacheKeyGenerator>(); services.AddSingleton <SpamProtectionCache>(); services.AddSingleton <IMailTemplatesCache, MailTemplatesCache>(); services.AddSingleton <CaptchaCacheService>(); }
public CryptService(IDataBaseFactory dbFactory) { this.dbFactory = dbFactory; cipher = new RijndaelManaged { KeySize = 256, BlockSize = 128, Padding = PaddingMode.ISO10126, Mode = CipherMode.CBC }; using (var db = dbFactory.CreateDb()) { foreach (var x in db.CipherSecrets) { AddCipherKey(x.Name, x.Secret); } } }
private void SubscribeConn_SubscribeMySqlLog(MySqlResponseData data) { if (data != null) { IDataBaseFactory dataBaseFactory = null; switch (data.DataBaseName.ToLower()) { case "jijiaworkflow": dataBaseFactory = new JiJiaWorkFlowFactory(); break; default: break; } if (dataBaseFactory != null) { dataBaseFactory.GetTableData(data); } } }
public UnitOfWork(IDataBaseFactory SolutionFactory) { DBFactory = SolutionFactory; }
public ProductRepository(IDataBaseFactory dataBaseFactory) : base(dataBaseFactory) { dbset = DataContext.Set <PRODUCT>(); }
public SenderRepository(IDataBaseFactory databasefactory) : base(databasefactory) { }
public HMRCResponseRepository(IDataBaseFactory databasefactory) : base(databasefactory) { }
public InvoiceRepository(IDataBaseFactory databasefactory) : base(databasefactory) { this._databasefactory = databasefactory; }
public ClientRepository(IDataBaseFactory databasefactory) : base(databasefactory) { }
public PeriodDataRepository(IDataBaseFactory databasefactory) : base(databasefactory) { this._databasefactory = databasefactory; }
public BusinessRepository(IDataBaseFactory databasefactory) : base(databasefactory) { this._databasefactory = databasefactory; }
public UnitOfWork(IDataBaseFactory factory) { this.factory = factory; }