---------------------------
Microsoft Visual Studio
---------------------------
An exception of type 'System.ArgumentException' occurred while attempting to update from the database. The exception message is: 'An entry with the same key already exists.'.
---------------------------
OK
---------------------------
I've added a new table in my database and now I want to update the model. ... An exception of type 'Microsoft. ... ConnectionStringConverterServiceException' occurred while attempting to update from the database the exception message is: 'An entry with the same key already exists.'.
Answer
You probably have two identical nodes: EntitySetMapping.You should remove one and everything will be ok.
Answer
- Deleted all tabels from the <name>.edmx model that contained the reference or what ever that was causing the error.
- And the right clicked the designer and click "Update Model from Database" again and all was fixed.
I think this step working fine.In my case i have solved my problem by given above step.
Answer
If your error is not solved by above code i think there is a problem in your connection string its solve as given below step.Please copy and paste your connection string into your app.config/web.config whatever config file you are using.
1) First open your.edmx file
2) And then click on blank space in that model
3) you will see the Properties panel in the right side of the window.
4) choose connection string just copy and paste in your config file
Hope you will be able to avoid from getting exception anymore.
Comments