public ProductDto CreateProduct(ProductDto product) { product.DtoKey = this.ProductService.Add(product); this.UnitOfWork.SaveChanges(); product.ProductID = Convert.ToInt32(product.DtoKey); return product; }
public void DeleteProduct(ProductDto product) { this.ProductService.Delete(product); this.UnitOfWork.SaveChanges(); }