Refactored ScanLibrary to accept and library id rather than DTO. Refactored ScanLibrary to use Task.Run() rather than having synchronous repo methods.

This commit is contained in:
Joseph Milazzo 2021-01-02 12:48:48 -06:00
parent 9168e12483
commit 7b1714349d
9 changed files with 44 additions and 75 deletions

View file

@ -10,16 +10,10 @@ namespace API.Interfaces
void Update(Library library);
Task<bool> SaveAllAsync();
Task<IEnumerable<LibraryDto>> GetLibrariesAsync();
/// <summary>
/// Checks to see if a library of the same name exists. We only allow unique library names, no duplicates per LibraryType.
/// </summary>
/// <param name="libraryName"></param>
/// <returns></returns>
Task<bool> LibraryExists(string libraryName);
Task<LibraryDto> GetLibraryDtoForIdAsync(int libraryId);
Task<Library> GetLibraryForIdAsync(int libraryId);
bool SaveAll();
Library GetLibraryForName(string libraryName);
Task<IEnumerable<LibraryDto>> GetLibrariesForUsernameAysnc(string userName);
Task<IEnumerable<LibraryDto>> GetLibrariesDtoForUsernameAsync(string userName);
Task<Library> GetLibraryForNameAsync(string libraryName);
}
}