// GET: Supplier/Create public ActionResult SupplierCreate() { var vm = new SupplierCreateEditViewModel() { }; return(View(vm)); }
public ActionResult SupplierCreate(SupplierCreateEditViewModel vm) { if (ModelState.IsValid) { _purchaseUow.Suppliers.Add(vm.Supplier); _purchaseUow.Commit(); return(RedirectToAction("Create")); } return(View(vm)); }