Our Application is an MVC Application. We are using Entity Framework. When I am updating the model to add a table from the database. I am recieving an exception and it says
"An exception of type 'System.ArgumentException' occured while attempting to update from the database. The exception message is: 'An entry with the same key already exists'."
I am not able to figure out what is the problem. Can I have a solution to get over the problem.
In the Model Browser, right-click the . edmx file and select Update Model from Database. Expand the Tables, Views, and Stored Procedures nodes, and check the objects you want to add to the . edmx file.
Right-click anywhere on the design surface, and select Update Model from Database. In the Update Wizard, select the Refresh tab and then select Tables > dbo > Student. Click Finish.
I had it just as you did. You probably have two identical nodes: EntitySetMapping
. You should remove one and everything will be ok.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With