public ActionResult Edit(Guid?id, SysAction collection) { if (!ModelState.IsValid) { return(View(collection)); } _sysActionService.Save(id, collection); _unitOfWork.Commit(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit(string id, SysAction collection) { if (!ModelState.IsValid) { Edit(id); return(View(collection)); } _sysActionService.Save(id, collection); await _unitOfWork.CommitAsync(); return(new EditSuccessResult(id)); }