Project values from an EntityCollection in LINQ


/ Published in: C#
Save to your folder(s)

Uses a nested query to prject values from an entity collection.


Copy this code and paste it in your HTML
  1. from c in context.Contacts
  2. select new {c.FirstName, c.LastName,
  3. StreetsCities = from a in c.Addresses select new { a.Street1, a.City }
  4. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.