How to filter child property LINQ RRS feed

  • Question

  • hi all

    can someone help me !?

    i have a EF entity with a proprety as collection of childs

    what i need is to set a filter in the childs !

    anyone knows how to set !?


    thks !



    Wednesday, May 26, 2010 10:31 PM


  • Hi,

    Your question seems to be related to Entity Framework but you asked it in the Linq To SQL forum. Anyway, I will answer how to eager load child entities in both situations.

    In Linq to SQL, child entities can be eager loaded using LoadWith , while for filtered child collection, we need to use AssociateWith .

    In Entity Framework, child entities can be loaded using Include , while for filtered child collection, we need to utilize the Relationship Fixup as described in this post.

    Hope that helps.



    Syed Mehroz Alam
    My Blog | My Articles
    Thursday, May 27, 2010 6:00 AM