Ejemplo n.º 1
0
        public BaseService(IDBSettings settings, string collName)
        {
            var client = new MongoClient(settings.ConnectionString);

            _database   = client.GetDatabase(settings.DatabaseName);
            _collection = _database.GetCollection <T>(collName);
        }
Ejemplo n.º 2
0
 /// <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;
 }
Ejemplo n.º 3
0
        public CustomerService(IDBSettings settings)
        {
            var client = new MongoClient(settings.ConnStr);
            var db     = client.GetDatabase(settings.DBName);

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

            _animal = database.GetCollection <Animal>(settings.AnimalColName);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 6
0
        public LogService(IDBSettings settings)
        {
            var client = new MongoClient(settings.ConnStr);
            var db     = client.GetDatabase(settings.DBName);

            _log = db.GetCollection <Log>("Log");
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 9
0
        public UserService(IDBSettings settings)
        {
            MongoClient    client   = new MongoClient(settings.ConnectionString);
            IMongoDatabase database = client.GetDatabase(settings.DBName);

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

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

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

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

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

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

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

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

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

            _contact = database.GetCollection <Contact>(settings.CollectionName);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 20
0
 /// <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;
 }
Ejemplo n.º 21
0
 public EmployeeActivityByDapperRepository(IDBSettings dBSettings, IMemoryCache memmoryCache, ICacheSettings cacheSettings)
 {
     _dBSettings    = dBSettings;
     _memmoryCache  = memmoryCache;
     _cacheSettings = cacheSettings;
 }
Ejemplo n.º 22
0
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public PersonRepository(IDBSettings dbSettings)
     : base(dbSettings)
 {
 }
Ejemplo n.º 23
0
 /// <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;
        }
Ejemplo n.º 28
0
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public ApplicationRepository(IDBSettings dbSettings)
     : base(dbSettings)
 {
 }
Ejemplo n.º 29
0
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public QueryService(IDBSettings dbSettings)
 {
     DBSettings = dbSettings;
 }
Ejemplo n.º 30
0
 /// <summary>
 /// コンストラクタ。
 /// </summary>
 /// <param name="dbSettings"><see cref="IDBSettings"/></param>
 public PersonQueryService(IDBSettings dbSettings)
     : base(dbSettings)
 {
 }