public ActionResult Edit(User user) { try { if (!ModelState.IsValid) { return(View()); } using (UsersLogic logic = new UsersLogic()) { logic.EditUser(user); } return(RedirectToAction("Index", "MangeHome")); } catch (Exception) { ViewBag.Error = "We have problem on the server, Please try again later!"; return(View(new User())); } }
public void EditUser([FromBody] User user) { _usersLogic.EditUser(user); }