Пример #1
0
        public ContactRepo(ILogger <ContactRepo> logger, IOptions <DB> dbOptions)
        {
            logger.CheckNull();
            dbOptions.CheckNull();

            _logger    = logger;
            _dbOptions = dbOptions;

            _context = new ContactsDbContext(_dbOptions);
        }
Пример #2
0
        public BaseDbContext(IOptions <DB> dbOptions)
        {
            dbOptions.CheckNull();

            _dbOptions = dbOptions;

            _connectionString = _dbOptions.Value.BTConnectionString;

            _connectionString.CheckNullOrEmpty(nameof(_connectionString));
        }
Пример #3
0
        public AddressRepo(ILogger <AddressRepo> logger, IOptions <DB> dbOptions)
        {
            logger.CheckNull();
            dbOptions.CheckNull();

            _logger    = logger;
            _dbOptions = dbOptions;

            _context = new AddressDbContext(_dbOptions);
        }
 public ContactsDbContext(IOptions <DB> dbOptions) : base(dbOptions)
 {
     dbOptions.CheckNull();
 }
 public AddressDbContext(IOptions <DB> dbOptions) : base(dbOptions)
 {
     dbOptions.CheckNull();
 }