Optimize EF Core queries and remove unnecessary AsQueryable calls

This commit is contained in:
Patrick Barron
2023-01-16 11:49:59 -05:00
parent ab6baf6486
commit f07553abdf
5 changed files with 21 additions and 39 deletions

View File

@@ -143,7 +143,6 @@ namespace Jellyfin.Server.Implementations.Users
await using (dbContext.ConfigureAwait(false))
{
if (await dbContext.Users
.AsQueryable()
.AnyAsync(u => u.Username == newName && !u.Id.Equals(user.Id))
.ConfigureAwait(false))
{