I have the following....
Dim ProjectToDelete As Project2Host = dc.Project2Hosts.Single(Function(p) p.Host = tb_Host.Text)
dc.Projects2Hosts.DeleteOnSubmit(ProjectToDelete)
dc.SubmitChanges
This worked fine as there was only ever one Project associated to a Host.
The rules have now changed and there can be more than one Project per Host. I now need to create a List of ProjectsToDelete and populate that with a Linq query and then do a DeleteAllOnSubmit(ProjectsToDelete).
How do I create the list? I've beem trying .SelectMany but with no joy.
Any help appreciated.