public ActionResult Registration(UserRegister user) { if (user.IsValid()) { var tempUser = Mapper.Map <UserRegister, User>(user); tempUser.RoleId = 2; PerformCall(() => mCreateRepository.Create(tempUser)); return(RedirectToAction("Index")); } return(View(user)); }