public ActionResult Create(UserCreateModel user) { user.RoleId = 2; userService.CreateUser(Mapper.Map<UserCreateModel, BLLUser>(user)); return RedirectToAction("Index"); }
public ActionResult Edit(UserCreateModel user) { user.RoleId = 2; userService.UpdateUser(Mapper.Map<UserCreateModel, BLLUser>(user)); return RedirectToAction("Details", "Home", new { Id = userService.GetIdByUsername(user.UserName) }); }
public ActionResult Create() { var view = new UserCreateModel() { IsCreatingNow = true }; return View(view); }