Created
July 13, 2019 09:13
-
-
Save DmitrySikorsky/17d171f3c5dea45914cc604a216b257b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IEnumerable<LocalizedBook> GetAll(string cultureCode) | |
{ | |
return this.storage.Books.Select( | |
b => new LocalizedBook() | |
{ | |
Id = b.Id, | |
Name = b.Name.Localizations.FirstOrDefault(l => l.CultureCode == cultureCode).Value, | |
Description = b.Description.Localizations.FirstOrDefault(l => l.CultureCode == cultureCode).Value, | |
Author = b.Author.Localizations.FirstOrDefault(l => l.CultureCode == cultureCode).Value, | |
Year = b.Year | |
} | |
).ToList(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment