Beispiel #1
0
        public CouponRepository(IShoppingCartDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _coupons = database.GetCollection <Coupon>("Coupons");
        }
        public ShoppingCartRepository(IShoppingCartDatabaseSettings settings)
        {
            var client   = new MongoClient(settings.ConnectionString);
            var database = client.GetDatabase(settings.DatabaseName);

            _carts = database.GetCollection <Cart>(settings.CollectionName);
        }
Beispiel #3
0
 public FakeCouponRepository(IShoppingCartDatabaseSettings settings)
 {
     _coupons = new List <Coupon>();
 }
Beispiel #4
0
 public FakeShoppingCartRepository(IShoppingCartDatabaseSettings settings)
 {
     _carts = new List <Cart>();
 }