コード例 #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);
        }
コード例 #4
0
 public ContactsDbContext(IOptions <DB> dbOptions) : base(dbOptions)
 {
     dbOptions.CheckNull();
 }
コード例 #5
0
 public AddressDbContext(IOptions <DB> dbOptions) : base(dbOptions)
 {
     dbOptions.CheckNull();
 }