public ActionResult Create(SupplierModel model) { if (ModelState.IsValid) { this.supplierService.Create(model.CreatesupplierFromModel()); return RedirectToAction("Index"); } return View(); }
public ActionResult Edit(SupplierModel model) { if (ModelState.IsValid) { var supplier = this.supplierService.GetByID(model.ID); supplier.Name = model.Name; this.supplierService.Save(); return RedirectToAction("Index"); } return View(); }