Filtering EntityCollections in LINQ


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

Uses lambda and any operator to filter list.


Copy this code and paste it in your HTML
  1. from c in context.Contacts
  2. where c.Addresses.Any(a => a.CountryRegion == "UK")
  3. select c;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.