public async Task <IActionResult> Post(User user) { if (user != null) { _repo.AddUser(user); if (await _repo.SaveChanges()) { return(Created($"api/AuthController/{user.Id}", user)); } } return(BadRequest("Failed")); }