Exemplo n.º 1
0
 public static Product FromEditProductViewModel(ProductEditViewModel viewModel)
 {
     return new Product
     {
         Id = viewModel.Id ?? 0,
         Quantity = viewModel.Quantity,
         Name = viewModel.Name,
         Description = viewModel.Description,
         Price = viewModel.Price,
         Category = viewModel.Category
     };
 }
Exemplo n.º 2
0
 public ActionResult Create(ProductEditViewModel product)
 {
     return Content("ok");
 }