/*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); }
public ProductCart Create(ProductCart productCart) { ValidateIntegrity(productCart); return(_productCartRepository.Create(productCart)); }