locked
Duplicated ResultMapping element encountered RRS feed

  • Question

  • User-515898492 posted

    Hi,

        I imported Store Procedure from database to edmx and the SP returns 4 resultsets, so i edited the edmx and added the multiple "ReturnType" in the particular function import to get all the resultsets and now I can able to get the result without any exception. 

    But i am getting the error "Duplicated ResultMapping element encountered" whenever i open the edmx. I want to make the project with error or warning free project. So how to avoid this error. Please recommand the ideas to overcome this issue.

    I followed below reference

    http://www.codeproject.com/Articles/675933/Returning-Multiple-Result-Sets-from-an-Entity-Fram

    Monday, May 25, 2015 7:03 AM

Answers

  • User-84896714 posted

    Hi arunabathan,
    This error will always exist, when you validate your entity framework model.
    There is no way to avoid it.
    But it does not appear when you compile or launch your project.
    Best Regards,
    Wang Li

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 27, 2015 2:21 AM

All replies

  • User-84896714 posted

    Hi arunabathan,
    Thank you for your post.

    If you are using the EF Designer, you can also modify your model so that it knows about the different result sets that will be returned. One thing to know before hand is that the tooling is not multiple result set aware, so you will need to manually edit the edmx file. Editing the edmx file like this will work but it will also break the validation of the model in VS. So if you validate your model you will always get errors.
    Link below is for your reference.
    https://msdn.microsoft.com/en-us/data/JJ691402.aspx

    Hoping my reply could be helpful to you.
    Best Regards,
    Wang Li

    Tuesday, May 26, 2015 4:23 AM
  • User-515898492 posted

    Hi Li Wang,

    You are correct, it edited the .edmx file manually to get the multiple resultsets. But my concern is that i need to remove or avoid the edmx model validation. So can you please tell me how to avoid this errors.

    Tuesday, May 26, 2015 6:56 AM
  • User-84896714 posted

    Hi arunabathan,
    This error will always exist, when you validate your entity framework model.
    There is no way to avoid it.
    But it does not appear when you compile or launch your project.
    Best Regards,
    Wang Li

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 27, 2015 2:21 AM