Hi I have a 2 tables BlogPost and BlogComments
I want to get all BlogPosts that have a state of "published". and get all BlogComments for each post that has a state of "published".
Im using something like this to get the blogposts:
var BlogPosts = (from p in db.BlogPosts where p.State == State.Published select p).ToArray();
but due to the relationship with BlogComments it autiomatically has all the BlogComments (both published and unpublished).
How can I just get the "published" comments for each of the blogposts (i.e the approved ones)
thanks