-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Description
Those methods name must be displaced
public async Task GetUserIdAsync(string userName)
{
var user = await _userManager.Users.FirstOrDefaultAsync(x => x.UserName == userName);
if (user == null)
{
throw new NotFoundException("User not found");
//throw new Exception("User not found");
}
return await _userManager.GetUserIdAsync(user);
}
public async Task<string> GetUserNameAsync(string userId)
{
var user = await _userManager.Users.FirstOrDefaultAsync(x => x.Id == userId);
if (user == null)
{
throw new NotFoundException("User not found");
//throw new Exception("User not found");
}
return await _userManager.GetUserNameAsync(user);
}
Metadata
Metadata
Assignees
Labels
No labels