public BaseService(IDBSettings settings, string collName)
        {
            var client = new MongoClient(settings.ConnectionString);

            _database   = client.GetDatabase(settings.DatabaseName);
            _collection = _database.GetCollection <T>(collName);
        }
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public SqlRepository(IDBSettings dbSettings)
     : base(dbSettings)
 {
     Factory    = DBSettings.SqlProviderFactory;
     Connection = Factory.CreateConnection();
     Connection.ConnectionString = DBSettings.SqlConnectionString;
 }
Beispiel #3
0
        public CustomerService(IDBSettings settings)
        {
            var client = new MongoClient(settings.ConnStr);
            var db     = client.GetDatabase(settings.DBName);

            _customer = db.GetCollection <Customer>("Customer");
        }
Beispiel #4
0
        public AnimalService(IDBSettings settings)
        {
            MongoClient    client   = new MongoClient(settings.ConnectionString);
            IMongoDatabase database = client.GetDatabase(settings.DBName);

            _animal = database.GetCollection <Animal>(settings.AnimalColName);
        }
Beispiel #5
0
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public DataSetup(IDBSettings dbSettings)
 {
     DBSettings = dbSettings;
     Factory    = DBSettings.SqlProviderFactory;
     Connection = Factory.CreateConnection();
     Connection.ConnectionString = DBSettings.SqlConnectionString;
 }
Beispiel #6
0
        public LogService(IDBSettings settings)
        {
            var client = new MongoClient(settings.ConnStr);
            var db     = client.GetDatabase(settings.DBName);

            _log = db.GetCollection <Log>("Log");
        }
Beispiel #7
0
        public ProductService(IDBSettings settings)
        {
            var client = new MongoClient(settings.ConnStr);
            var db     = client.GetDatabase(settings.DBName);

            _product = db.GetCollection <Product>("Product");
        }
        public AuthorService(IDBSettings settings) : base(settings, "author")
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _authorCollection = database.GetCollection <Author>("author");
        }
        public UserService(IDBSettings settings)
        {
            MongoClient    client   = new MongoClient(settings.ConnectionString);
            IMongoDatabase database = client.GetDatabase(settings.DBName);

            _users = database.GetCollection <User>(settings.UsersColName);
        }
        public TaxonomyService(IDBSettings settings)
        {
            MongoClient    client   = new MongoClient(settings.ConnectionString);
            IMongoDatabase database = client.GetDatabase(settings.DBName);

            _taxonomy = database.GetCollection <Taxonomy>(settings.TaxonomyColName);
        }
        public ReportService(IDBSettings settings)
        {
            MongoClient    client   = new MongoClient(settings.ConnectionString);
            IMongoDatabase database = client.GetDatabase(settings.DBName);

            _reports = database.GetCollection <Report>(settings.ReportsColName);
        }
Beispiel #12
0
        public DonerService(IDBSettings settings)
        {
            MongoClient    client   = new MongoClient(settings.ConnectionString);
            IMongoDatabase database = client.GetDatabase(settings.DBName);

            _doner = database.GetCollection <Doner>(settings.DonerColName);
        }
Beispiel #13
0
        public OrganService(IDBSettings settings)
        {
            MongoClient    client   = new MongoClient(settings.ConnectionString);
            IMongoDatabase database = client.GetDatabase(settings.DBName);

            _organ = database.GetCollection <Organ>(settings.OrganColName);
        }
Beispiel #14
0
        public EmployeeService(IDBSettings settings)
        {
            var client = new MongoClient(settings.ConnStr);
            var db     = client.GetDatabase(settings.DBName);

            _employee = db.GetCollection <Employee>("Employee");
        }
Beispiel #15
0
        public NewsService(IDBSettings settings)
        {
            MongoClient    client   = new MongoClient(settings.ConnectionString);
            IMongoDatabase database = client.GetDatabase(settings.DBName);

            _news = database.GetCollection <News>(settings.NewsColName);
        }
Beispiel #16
0
        public SupplierService(IDBSettings settings)
        {
            var client = new MongoClient(settings.ConnStr);
            var db     = client.GetDatabase(settings.DBName);

            _supplier = db.GetCollection <Supplier>("Supplier");
        }
        public BookService(IDBSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _booksCollection = database.GetCollection <Book>("books");
        }
Beispiel #18
0
        public DBClient(IDBSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _contact = database.GetCollection <Contact>(settings.CollectionName);
        }
Beispiel #19
0
        public DbContext(IDBSettings settings)
        {
            var client = new MongoClient(settings.ConnectionString);
            var db     = client.GetDatabase(settings.DatabaseName);

            Subscriptions = db.GetCollection <Subscription>(settings.SubscriptionName);
            Messages      = db.GetCollection <Message>(settings.MessagesName);
        }
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public SqlQueryService(IDBSettings dbSettings)
     : base(dbSettings)
 {
     Factory    = DBSettings.SqlProviderFactory;
     Connection = Factory.CreateConnection();
     Connection.ConnectionString = DBSettings.SqlConnectionString;
     _sqlConnectionString        = DBSettings.SqlConnectionString;
     _replicaSqlConnectionString = DBSettings.ReplicaSqlConnectionString;
 }
Beispiel #21
0
 public EmployeeActivityByDapperRepository(IDBSettings dBSettings, IMemoryCache memmoryCache, ICacheSettings cacheSettings)
 {
     _dBSettings    = dBSettings;
     _memmoryCache  = memmoryCache;
     _cacheSettings = cacheSettings;
 }
Beispiel #22
0
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public PersonRepository(IDBSettings dbSettings)
     : base(dbSettings)
 {
 }
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public ProjectQueryService(IDBSettings dbSettings)
     : base(dbSettings)
 {
 }
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public TableStorageQueryService(IDBSettings dbSettings)
     : base(dbSettings)
 {
     StorageAccount = CloudStorageAccount.Parse((string)DBSettings.StorageConnectionString);
     TableClient    = StorageAccount.CreateCloudTableClient();
 }
 public EmployeeActivityDBContext(IDBSettings dBSettings)
 {
     _iDBSettings = dBSettings;
 }
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public AuthorizationCodeRepository(IDBSettings dbSettings)
     : base(dbSettings)
 {
 }
        public UserDomain(IWebHostEnvironment environment, IHttpContextAccessor httpContextAccessor, IGeneralSettings generalSettings, IDBSettings dbSettings, IEmailSender emailSender, ITransactionDomain transactionDomain) : base(environment, httpContextAccessor, generalSettings)
        {
            var client   = new MongoClient(dbSettings.ConnectionString);
            var database = client.GetDatabase(dbSettings.DatabaseName);

            _userCollection    = database.GetCollection <UserModel>(dbSettings.UsersCollectionName);
            _emailSender       = emailSender;
            _transactionDomain = transactionDomain;
        }
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public ApplicationRepository(IDBSettings dbSettings)
     : base(dbSettings)
 {
 }
Beispiel #29
0
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public QueryService(IDBSettings dbSettings)
 {
     DBSettings = dbSettings;
 }
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public PersonQueryService(IDBSettings dbSettings)
     : base(dbSettings)
 {
 }