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

asp.net-mvc entity-framework

Question

We are using an MVC application. Use of Entity Framework is prevalent. When I am adding a table from the database to the model during an update. I just received an exception that reads,

"When trying to update from the database, a System.ArgumentException event of type occurred. "An entry with the same key already exists," reads the exception message."

I cannot determine the source of the issue. Please provide me a solution to the issue.

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

Popular Answer

I had exactly what you did. You likely have two nodes that are identical:EntitySetMapping . Remove one, and everything will work out.

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