/*public ProductCartService(global::DataAccess.Repositories.ProductCartRepository productCartRepository)
         * {
         *  this.productCartRepository = productCartRepository;
         * }*/

        public void AddProductToCart(Products product, Carts cart)
        {
            var productCart = new CartProduct
            {
                Products = product,
                Carts    = cart
            };

            _repository.Create(productCart);
        }
Exemple #2
0
 public ProductCart Create(ProductCart productCart)
 {
     ValidateIntegrity(productCart);
     return(_productCartRepository.Create(productCart));
 }