public ActionResult Delete(ShopProduct viewModel) { if (ModelState.IsValid) { _service.Remove(viewModel.ShopProductId); return RedirectToAction("Index"); } return View(); }
public ShopProductEditModel(ShopProduct entity) { Product = entity; }