public ProductEntity Create(ProductEntity product) { ProductDTO returnProduct = new ProductDTO(); returnProduct = _ProductsDal.Create(product.ProductToProductDTO()); return(new ProductEntity().ProductDTOToProduct(this.Read(returnProduct.Id))); }
public ProductDTO Update(ProductEntity product) { ProductDTO returnProduct = new ProductDTO(); if (_ProductsDal.Update(product.ProductToProductDTO())) { returnProduct = this.Read(product.Id); } return(returnProduct); }
public ProductEntity Create(ProductEntity product) { return(new ProductEntity().ProductDTOToProduct(_ProductsDal.CreateAsync(product.ProductToProductDTO()).Result)); }