While updating Model from Database, a System.ArgumentException occurred.

asp.net-mvc entity-framework

Question

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.

1
17
2/26/2013 1:17:51 PM

Popular Answer

I had it just as you did. You probably have two identical nodes: EntitySetMapping. You should remove one and everything will be ok.

39
7/26/2012 1:04:47 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow