public ProductService(IStoreDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _products = database.GetCollection <Product> (settings.ProductsCollectionName); }
public UserRepository(IStoreDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _users = database.GetCollection <User>("users"); }
public CategoryRepository(IStoreDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _categorys = database.GetCollection <Category>("Categorys"); }
public StoreService(IStoreDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _items = database.GetCollection <Items>(settings.ItemsCollectionName); }
public PartialsRepository(IStoreDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _users = database.GetCollection <PartialTemplate>("partials"); }
public Service(IStoreDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _geolocalizar = database.GetCollection <Geolocalizar>(settings.CollectionName); }
//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); }
public VacancyService(IStoreDatabaseSettings settings) { var client = new MongoClient(settings.ConnectionString); var database = client.GetDatabase(settings.DatabaseName); _collection = database.GetCollection <Vacancy>(Collection.Vacancy); }
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) }; }