Performance Improvements (#2449)
This commit is contained in:
parent
419a827d42
commit
5ed1eebd26
34 changed files with 389 additions and 132 deletions
|
@ -23,6 +23,7 @@ public interface IPersonRepository
|
|||
Task<IList<PersonDto>> GetAllPeopleDtosForLibrariesAsync(List<int> libraryIds, int userId);
|
||||
Task<int> GetCountAsync();
|
||||
|
||||
Task<IList<Person>> GetAllPeopleByRoleAndNames(PersonRole role, IEnumerable<string> normalizeNames);
|
||||
}
|
||||
|
||||
public class PersonRepository : IPersonRepository
|
||||
|
@ -80,6 +81,13 @@ public class PersonRepository : IPersonRepository
|
|||
return await _context.Person.CountAsync();
|
||||
}
|
||||
|
||||
public async Task<IList<Person>> GetAllPeopleByRoleAndNames(PersonRole role, IEnumerable<string> normalizeNames)
|
||||
{
|
||||
return await _context.Person
|
||||
.Where(p => p.Role == role && normalizeNames.Contains(p.NormalizedName))
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
public async Task<IList<Person>> GetAllPeople()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue