How to aggregate over few types with linq?
- by Shimmy
Can someone help me translate the following to one liner:
Dim items As New List(Of Object)
For Each c In ph.Contacts
items.Add(New With {.Type = "Contact", .Id = c.ContactId, .Title = c.Title})
Next
For Each c In ph.Persons
items.Add(New With {.Type = "Person", .Id = c.PersonId, .Title = c.Title})
Next
For Each c In ph.Jobs
…