I found this http://msdn.microsoft.com/en-US/data/jj574232 however this seem to only work on a single entity
var blog = context.Blogs.Find(1);
// Load the posts with the 'entity-framework' tag related to a given blog
context.Entry(blog)
.Collection(b => b.Posts)
.Query()
.Where(p => p.Tags.Contains("entity-framework")
.Load();
Since blogs is not just one entity... but rather a collection in and of itself. Does anyone know how to rewrite this so that .Entry is operating over the collection of blogs. I can't find any documentation on if something like this is possible
This means you wouldn't have to grab one in particular and do operations on it but it would loop over each and perform the operation.
context.Blogs.ForEach(entity in Blogs).Collection(b => b.Posts)
.Query()
.Where(p => p.Tags.Contains("entity-framework")
.Load();