public async Task <IActionResult> Signup([FromBody] Users user) { Users x = userDataProvider.GetUserByUsername(user.Email).Result; //var user = _usersDb.Users.SingleOrDefault(u => u.Username == username); if (x != null) { return(StatusCode(409)); } user.Password = _passwordHasher.GenerateIdentityV3Hash(user.Password); await this.userDataProvider.AddUser(user); return(Ok(user)); }