none
Entity Framework 5 Store procedure parameter mapping RRS feed

  • Question

  • Hi,

    We have Database first (Database to EF) model. I have updated Tables and stored procedures.

    1. We are mapping Sql server parameters and the attribute

    2. This Stored procedure is for insert

    3. In the store procedure, we have a input parameter (e.g code) which is not mapping with any fields in the entity framework property

    4. We are tried to add a property in the edmx designer file to that particluar model and mapped to that field but that is not work out.

    Please help us on this situation.

    Thanks in Advance

    Friday, November 8, 2013 12:09 PM

Answers

  • Hello,

    >>3. In the store procedure, we have a input parameter (e.g code) which is not mapping with any fields in the entity framework property

    The store procedure input parameter does not need to map with entity framework property, it just a input parameter, what you will do use this parameter is decided by you.

    >>4. We are tried to add a property in the edmx designer file to that particluar model and mapped to that field but that is not work out.

    Is the property mapped to the table filed or store procedure? Do you have a complete mapping in edmx file? If we want to map a filed from model to database, we need to add the mapping in the three contect:SSDL content, CSDL contect, C-S mapping content.

    However, I am strange that why you want to add a property, because if we use Entity Framework, the mapping will be created automatically while we add a table or store procedure.

    If I have misunderstood, please let me know.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, November 11, 2013 1:53 AM
    Moderator