public async Task <List <LibraryRecordDetailDTO> > GetAllLibraryRecords() { var records = await allLibraryRecordsQuery.GetResultsAsync(); var returnRecords = new List <LibraryRecordDetailDTO>(); foreach (var item in records) { returnRecords.Add(LibraryRecordMapper.MapTo(item)); } return(returnRecords); }
public async Task <LibraryRecordDetailDTO> GetLibraryRecordById(string id) { return(LibraryRecordMapper.MapTo(await libraryRecordRepository.GetByIdAsync(new LibraryRecordId(id)))); }