Load parent and child table in one query linq to entitiy

Posted by parminder on Stack Overflow See other posts from Stack Overflow or by parminder
Published on 2010-05-19T15:19:29Z Indexed on 2010/05/19 15:20 UTC
Read the original article Hit count: 375

Hi Experts, I have a following tables/classes structure in Linq to entities.

` Books { bookId, Title

}

Tags {

TagId Tag

}

BooksTags { BookId TagId

}

'

Now I need to write a query which gives me result like this

Class Result { bookId, Title Tags }

Tags should be comma separated text from the tags table by joining all three tables. How to get it done.

Thanks

Parminder

© Stack Overflow or respective owner

Related posts about linq-to-entities

Related posts about asp.net-mvc