Created
July 13, 2019 09:15
-
-
Save DmitrySikorsky/a7f9771ad4e444bfded74a2307ef74d3 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 (from b in this.storage.Books | |
join lName in this.storage.Localizations on b.NameId equals lName.LocalizationSetId | |
join lDescription in this.storage.Localizations on b.DescriptionId equals lDescription.LocalizationSetId | |
join lAuthor in this.storage.Localizations on b.AuthorId equals lAuthor.LocalizationSetId | |
where lName.CultureCode == cultureCode && lDescription.CultureCode == cultureCode && lAuthor.CultureCode == cultureCode | |
select new LocalizedBook() | |
{ | |
Id = b.Id, | |
Name = lName.Value, | |
Description = lDescription.Value, | |
Author = lAuthor.Value, | |
Year = b.Year | |
}).ToList(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment