Implemented ability to delete a series. Refactored some operations to remove unneeded parameters.

This commit is contained in:
Joseph Milazzo 2021-01-12 16:51:23 -06:00
parent 83076f02ad
commit 56e8a0059e
9 changed files with 50 additions and 16 deletions

View file

@ -38,10 +38,12 @@ namespace API.Data
public async Task<IEnumerable<LibraryDto>> GetLibrariesDtoForUsernameAsync(string userName)
{
// TODO: Speed this query up
return await _context.Library
.Include(l => l.AppUsers)
.Where(library => library.AppUsers.Any(x => x.UserName == userName))
.ProjectTo<LibraryDto>(_mapper.ConfigurationProvider).ToListAsync();
.ProjectTo<LibraryDto>(_mapper.ConfigurationProvider)
.ToListAsync();
}
public async Task<Library> GetLibraryForNameAsync(string libraryName)