public IActionResult AccountInfo(User user) { //Add User information to the database _dbc.Users.Add(user); _dbc.SaveChanges(); return(RedirectToAction("PasswordInfo", new { id = user.Id })); }
public IActionResult EditUser(User user) { if (user.Id == 0) { _bdc.Add(user); } else { _bdc.Update(user); } _bdc.SaveChanges(); return(RedirectToAction("Index")); }
public void Post([FromBody] User user) { _bdc.Users.Add(user); _bdc.SaveChanges(); }