none
EF5 Code First EDMFunction support RRS feed

  • Question

  • From reading a number of posts i realize that EDMFunctions isn't supported in EF5 Code First.

    Does anyone have updates on whether this is to be supported (or anything similar) in the future?

    Friday, September 6, 2013 11:08 AM

Answers

  • Hi,

    EdmFunction was used by database management system or storage model.

    So, It needs to have EDMX file and otherwise you cannot define function mapping.

    If you approach your project using Code First, I don't think you can use EdmFunction API because you haven't model.

    Regards.

    Thursday, September 12, 2013 11:07 AM

All replies

  • Hello,

    Thanks for posting your question to this forum.

    As far as I know, since Code-First do not have an EDM file, it cannot map the function in database to the method in program in current version.

    Maybe this function will be released in next version Entity Framework 6.

    And there is a link below that shows how to implement calling the procedure with Code-First:

    http://www.codeproject.com/Articles/179481/Code-First-Stored-Procedures

    Best Regards.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 9, 2013 1:54 AM
    Moderator
  • Thanks for the reply.

    The stored procedure with code first does not solve my problem.

    What I needed from the EDMFunctions feature is the ability to "merge" the EDM query into a regular Linq-to-entities query and make the query execute as one combined query.


    Wednesday, September 11, 2013 10:14 AM
  • Hi,

    EdmFunction was used by database management system or storage model.

    So, It needs to have EDMX file and otherwise you cannot define function mapping.

    If you approach your project using Code First, I don't think you can use EdmFunction API because you haven't model.

    Regards.

    Thursday, September 12, 2013 11:07 AM