Tutorial Site/blog on How to Query Entity Framework Model RRS feed

  • Question

  • Hi,

    Is there any site(s) that would just focus and teach me how to write linq queries against EntityFramework,

    Starts from writing basic queries to joins and subqueries and writing complex queries.


    PS.  meanwhile if someone can guide below.

    from x in ctx.Deptartment
                           where x.Employees.Job = 'Manager'
                           Select x;

    Well What i am trying is to retrieve all departments where Employee Job is Manager.

    Wednesday, December 19, 2012 11:10 AM


  • Hi,

    In C#, the comparison is == rather than =. The purpose of Linq is to bring queries to your language so it uses the C# syntax (similarly value in (list) is list.Contains(value) in Linq).

    Else always tell the error message you get (for example it could be a typo in your message and the actual error could be something else, knowing the error message helps in most cases).

    Try for various examples...

    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".

    • Marked as answer by Alexander Sun Wednesday, December 26, 2012 3:02 AM
    Wednesday, December 19, 2012 12:01 PM