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

@@ -40,7 +40,6 @@ namespace Jellyfin.Server.Implementations.Security
await using (dbContext.ConfigureAwait(false))
{
return await dbContext.ApiKeys
.AsAsyncEnumerable()
.Select(key => new AuthenticationInfo
{
AppName = key.Name,
@@ -60,7 +59,6 @@ namespace Jellyfin.Server.Implementations.Security
await using (dbContext.ConfigureAwait(false))
{
var key = await dbContext.ApiKeys
.AsQueryable()
.Where(apiKey => apiKey.AccessToken == accessToken)
.FirstOrDefaultAsync()
.ConfigureAwait(false);