예제 #1
0
        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);
        }
예제 #2
0
 public async Task <LibraryRecordDetailDTO> GetLibraryRecordById(string id)
 {
     return(LibraryRecordMapper.MapTo(await libraryRecordRepository.GetByIdAsync(new LibraryRecordId(id))));
 }