Last post May 27, 2015 02:21 AM by Li Wang
May 25, 2015 07:03 AM|arunabathan|LINK
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
May 26, 2015 04:23 AM|Li Wang|LINK
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.
Hoping my reply could be helpful to you.
May 26, 2015 06:56 AM|arunabathan|LINK
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.
May 27, 2015 02:21 AM|Li Wang|LINK
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.