Esempio n. 1
0
        public SupermarketLocationService(IConfiguration config, IMongoDB settings, ISupermarketBrandService supermarketBrandService)
        {
            var server   = new MongoClient(config.GetSection("MongoDB").GetSection("ConnectionString").Value);
            var database = server.GetDatabase(config.GetSection("MongoDB").GetSection("Database").Value);

            _supermarketLocations    = database.GetCollection <SupermarketLocation>(config.GetSection("MongoDB").GetSection("SupermarketLocationsCollectionName").Value);
            _supermarketBrandService = supermarketBrandService;
        }
Esempio n. 2
0
 public SupermarketBrandController(ISupermarketBrandService supermarketBrandService)
 {
     _supermarketBrandService = supermarketBrandService;
 }