Example #1
0
        public ProductService(IStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _products = database.GetCollection <Product> (settings.ProductsCollectionName);
        }
Example #2
0
        public UserRepository(IStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _users = database.GetCollection <User>("users");
        }
Example #3
0
        public CategoryRepository(IStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _categorys = database.GetCollection <Category>("Categorys");
        }
Example #4
0
        public StoreService(IStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _items = database.GetCollection <Items>(settings.ItemsCollectionName);
        }
Example #5
0
        public PartialsRepository(IStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _users = database.GetCollection <PartialTemplate>("partials");
        }
Example #6
0
        public Service(IStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _geolocalizar = database.GetCollection <Geolocalizar>(settings.CollectionName);
        }
Example #7
0
        //public BookService (IBookstoreDatabaseSettings settings) {
        public BookService(IStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _books = database.GetCollection <Book> (settings.BooksCollectionName);
        }
Example #8
0
        public VacancyService(IStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _collection = database.GetCollection <Vacancy>(Collection.Vacancy);
        }
Example #9
0
        public MyTimeService(IStoreDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _place = database.GetCollection <Place>(settings.PlaceCollectionName);
            _user  = database.GetCollection <User>(settings.UserCollectionName);
            _job   = database.GetCollection <Job>(settings.JobCollectionName);
            _time  = database.GetCollection <Time>(settings.TimeCollectionName);
            _claimsIdentityLogout = database.GetCollection <ClaimsIdentityLogout>(settings.ClaimsIdentityLogoutCollectionName);

            _optionsPlace = new FindOptions <Place> {
                Sort = Builders <Place> .Sort.Ascending(place => place.PlaceId)
            };
        }