Пример #1
0
        public PaymentService(IImmovableStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            settings.ImmovableCollectionName = "PaymentCollection";
            _payments = database.GetCollection <Payment>(settings.ImmovableCollectionName);
        }
Пример #2
0
        public CustomerService(IImmovableStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            settings.ImmovableCollectionName = "CustomerCollection";
            _customers = database.GetCollection <Customer>(settings.ImmovableCollectionName);
        }
Пример #3
0
        public PropertyService(IImmovableStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            settings.ImmovableCollectionName = "PropertyCollection";
            _properties = database.GetCollection <Property>(settings.ImmovableCollectionName);
        }
Пример #4
0
        public MonthService(IImmovableStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            settings.ImmovableCollectionName = "MonthCollection";
            _months = database.GetCollection <Month>(settings.ImmovableCollectionName);
        }
Пример #5
0
        public LessorService(IImmovableStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            settings.ImmovableCollectionName = "LessorCollection";
            _lessors = database.GetCollection <Lessor>(settings.ImmovableCollectionName);
        }