public async Task <User> FindByUsernameAsync(string userName) { try { var users = await _usersData.FindByUsernameAsync(userName); if (users.Count > 0) { return(users[0]); } return(null); } catch (Exception e) { Console.WriteLine(e); throw; } }
public async Task <User> FindByUsernameAsync(string userName) { try { var users = await _usersData.FindByUsernameAsync(userName); if (users.Count > 0) { return(users[0]); } return(null); } catch (Exception e) { Console.WriteLine(e); throw; } }