locked
LINQ query in client getting incorrectly posted RRS feed

  • Question

  • I'm posting a LINQ request that is getting incorrectly translated in the client.

    My request that looks like this:
    Code Snippet
    var empsQ = from e in entities.Employment
    where e.Persons.PersonID == 1
    select e;

    var employees = empsQ.ToList();

    What should happen is that I get back all the places where the guy has worked.  The structure is Employment.Persons.PersonID (as designed in the EF model and then correctly compiled and presented by intellisense in the client - so it's part of the client autogen code).

    However, when I have listened to the SendingRequest, the RequestURI looks like:

    {http://localhost:9900/DataService.svc/Employment(1)}

    The strange thing was that this worked fine a couple days ago.
    I have tried regenerating the Client code a couple times, but it doesn't make a difference.    I have tried filtering by other linked entities, but get the same results.  Bits are Beta1.

    What can I do?
    Tuesday, July 8, 2008 10:18 PM

Answers

  • Hi,

     

    This is a known issue with the beta 1 LINQ translator. We've fixed it since then so it'll work as expected in the final version.

     

    Pablo Castro
    Software Architect
    Microsoft Corporation
    http://blogs.msdn.com/pablo

     

     

    Wednesday, July 9, 2008 4:38 AM
    Moderator