Multiplicity restriction violation

1

Has anyone ever come across this error in an asp.net mvc application?

  

Application Server Error '/'.

     

A relationship multiplicity restriction violation occurred: an EntityReference can not have more than one related object, but the query returned more than one related object. This is an unrecoverable error.

After a good period of time, the application started giving error when trying to call a list of data. Running the application I get this error.

    
asked by anonymous 09.06.2015 / 20:38

1 answer

1

Check the Attribute [Table] of your Models . Make sure you do not have any repeats:

[Table("Cidades")]
public class Cidade { ... }
    
09.06.2015 / 23:30