public ActionResult Delete(UserViewModel userViewModel) { User user = AutoMapper.Mapper.Map <UserViewModel, User>(userViewModel); User userView = userDetails.GetDetailsById(user.UserId); userDetails.Delete(userView); return(RedirectToAction("ManageUser", "User")); }