コード例 #1
0
 public string Export(IList <CategoryArea> categoryAreas)
 {
     return(_recordExtractor.GetRecordsContent <CategoryAreaRecord, CategoryAreaRecordMap>(
                categoryAreas.Select(a => new CategoryAreaRecord
     {
         Name = a.Name,
         Description = a.Description
     })));
 }
コード例 #2
0
 public string Export(IList <Category> categories)
 {
     return(_recordExtractor.GetRecordsContent <CategoryRecord, CategoryRecordMap>(
                categories.Select(c => new CategoryRecord
     {
         Name = c.Name,
         Description = c.Description,
         AreaName = c.CategoryArea?.Name
     })));
 }
コード例 #3
0
ファイル: BookExporter.cs プロジェクト: HojjatK/awesomebooks
 public string Export(IList <Book> books)
 {
     return(_recordExtractor.GetRecordsContent <BookRecord, BookRecordMap>(
                books.Select(b => new BookRecord
     {
         Title = b.Name,
         PublishYear = b.PublishYear,
         Authors = b.Authors,
         Rating = b.Rating,
         ImageUri = b.ImageUri,
         AmazonUri = b.AmazonUri,
         ContentUri = b.ContentUri,
         ContentType = b.ContentType,
         Reflection = b.Reflection,
         AreaName = b.Category?.CategoryArea?.Name,
         CategoryName = b.Category?.Name
     })));
 }