Skip to content

Instantly share code, notes, and snippets.

@dontpaniclabsgists
Created September 26, 2024 21:21
Show Gist options
  • Save dontpaniclabsgists/2ab120d5871939f21c4c85dd036cd66c to your computer and use it in GitHub Desktop.
Save dontpaniclabsgists/2ab120d5871939f21c4c85dd036cd66c to your computer and use it in GitHub Desktop.
stateVariations = db.StateVariations.ToArray();
// do any filtering on items other than state here, before pulling into memory
translations = db.Translations.Filter(…).ToArray();
joinedData = translations.GroupJoin(
stateVariations,
translation => translation.Id,
variation => variation.SystemLanguageTranslationId,
(translation, variation) => new { translation, variations = variation })
.Select(x => new CombinedDataObject
{
Id = x.translation.Id,
EN = x.translation.EN,
Variations = Mapper(x.variations),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment