Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Main()
- {
- var groups_to_querry = new List<Groups>();
- var contacts = groups_to_querry
- .SelectMany(x => x.Contacts)
- .Where(x => x.ID == Guid.Empty)
- .SelectMany(p => p.ContactDetails)
- .Where(x => x.ID == Guid.Empty)
- .SelectMany(x => x.Contacts);
- }
- class Groups
- {
- public ICollection<Contact> Contacts { get; set; }
- }
- class Contact
- {
- public Guid ID { get; set; }
- public ICollection<ContactDetail> ContactDetails { get; set; }
- }
- class ContactDetail
- {
- public Guid ID { get; set; }
- public ICollection<Contact> Contacts { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement