Ejemplo n.º 1
0
 public void UpdateProduct(ProductsWM webModel)
 {
     try
     {
         _productsOperations.UpdateProduct(ProductsMapping.MapToEntity(webModel));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.ToString());
     }
 }
Ejemplo n.º 2
0
 public static Products MapToEntity(ProductsWM webModel)
 {
     return(new Products()
     {
         ProductID = webModel.ProductID,
         CategoryID = webModel.CategoryID,
         ProductName = webModel.ProductName,
         UnitPrice = webModel.UnitPrice,
         UnitsInStock = webModel.UnitsInStock,
         UnitsOnOrder = webModel.UnitsOnOrder
     });
 }