none
Using EF stored procedures, return entity doesn't show foreign key fields RRS feed

  • Question

  • In my Silverlight app, I try to using stored procedures in EF to get Customer entities.

    In Function mapping, I also config to the function that return Entities Customer. As expected, it has properties likeCustomerIDCustomerName, etc.

    However, its Foreign Key properties are missing. I cannot see any ID on the entities returned. For instance, Customer has a foreign key EmployeeRangeID which reference to EmployeeRange table.

    If I use LINQ 2 EF, I can see EmployeeRangeID on Customer entity returned. When I use SP IN EF to return Customer entites, I cannot see EmployeeRangeID on EmployeeRangeReference or EmployeeRangeID on the Client.

    How can this be solved?

    Wednesday, February 1, 2012 4:33 PM

All replies

  • Hi maxma297,

    Welcome to MSDN Forum.

    Could you please post the code here, then I can repro the issue and help you more effectively.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us
    Friday, February 3, 2012 2:45 AM
    Moderator
  • Hi maxma297,

    Have you solved the issue? I look forward to hearing from you.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, February 7, 2012 2:36 AM
    Moderator