public async Task <IActionResult> Add(DBUser_Login user_Login) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await _LoginRepository.AddAsync(new User_Login { User_Login_EmailAddress = user_Login.User_Login_EmailAddress, User_Login_Name = user_Login.User_Login_Name, User_Login_PassWord = user_Login.User_Login_PassWord, User_Login_Right = user_Login.User_Login_Right, User_Login_Sex = user_Login.User_Login_Sex, User_Login_State = user_Login.User_Login_State }); return(RedirectToAction("Index")); }
public async Task <IActionResult> Add(DBUser_Login user_Login) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await _LoginRepository.AddAsync(new User_Login { User_Login_EmailAddress = user_Login.User_Login_EmailAddress, User_Login_Name = user_Login.User_Login_Name, User_Login_PassWord = user_Login.User_Login_PassWord, User_Login_Right = user_Login.User_Login_Right, User_Login_Sex = user_Login.User_Login_Sex, User_Login_State = user_Login.User_Login_State }); return(CreatedAtRoute("GetUser_Login", new { id = 2 }, user_Login)); }