Exemple #1
0
 public async Task <ProfileBar> GetProfileBar(long id)
 {
     return(await _context.Users
            .TagWith($"{nameof(UserRepository)}.{nameof(GetProfileBar)} -> {id}")
            .Where(u => u.Id == id)
            .Select(UserMappings.ToProfileBar(_uid))
            .FirstOrDefaultAsync());
 }
Exemple #2
0
 public async Task <ProfileBar> GetProfileBar(string name)
 {
     return(await _context.Users
            .TagWith($"{nameof(UserRepository)}.{nameof(GetProfileBar)} -> {name}")
            .Where(u => u.NormalizedUserName == name.Normalize().ToUpperInvariant())
            .Select(UserMappings.ToProfileBar(_uid))
            .FirstOrDefaultAsync());
 }