Hi,

I'm still learning in this area so please be gentle with me...

I am returning a list of entities from my database which are posts
from a forum...the posts can be marked by a logged in user as a
favourite.

so i have 2 tables in my DB (Posts, Post_Favourites). How can i return
a list of posts along with the relevant data from the post_favourite
table for the logged in user?

I tried this on my asp.net page to see if it would lazy load the
favourite data for each record but it's returning a list of ALL the
favourites for each member then filtering the correct one, i beleive
this is because the Post_Favourites property is IList ??

post.Post_Favourites.Where(c => c.Account.Equals
(userAccount)).SingleOrDefault(); // userAccount is the currently
logged in user


If anyone could give some guidance i would be extremely greatful so i
can move on in my project.

Thank you in advance!

Paul

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to