mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
minor SeedService optimization
per: https://stackoverflow.com/a/48463802/2343739
This commit is contained in:
parent
1ee069b8a3
commit
13bda354b4
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ public SeedService(FilterListsDbContext filterListsDbContext)
|
|||
|
||||
public async Task<IEnumerable<TMapped>> GetAll<TEntity, TMapped>() where TEntity : class
|
||||
{
|
||||
return await filterListsDbContext.Set<TEntity>().ProjectTo<TMapped>().ToListAsync();
|
||||
return await filterListsDbContext.Set<TEntity>().AsNoTracking().ProjectTo<TMapped>().ToArrayAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue