Thursday, 15 July 2010

c# - JSON circular reference in asp mvc 5 -


I'm getting a circular reference serialization error and the result failed to load status of 500.

I am trying to create a dynamic dropdown list with options from the database, connecting options with JS

These are my classes:

< Pre> public class IdentificacionViewModel {get public virtual Causes {Get; Set; } Public Virtual Identification Identification {Received; Set; } Public Partial Classroom Skills {Public Entry ID (Get; Set;} Public String Causes {get; Set;} Public String Agente {get; Set;} Public Taps qualified Id_Subproceso {get; set; } Public Taps qualified ID_Id (get); set;} Public Virtual Identification Recognition (Receive; Set;} Public Virtual Subprocassus Subprocasos {Received; Set;}} Public Identity () {this. Causas = new HashSet & lt; causas & gt; ();} general Public Entry ID {Received; Set}} Public String Nombre {get; Set;} Public Taps qualified IDservices {Get; set;} Public string etapa {receive; set;} public string recebo { Receive; set;} Public string EfectoProb {get; set;} Public virtual iconing & quot; Causes & gt; Causas {get; set;} Public Virtual Service Services (get; set;) Public Virtual Impact In Pacto {Receive; Set;}}

My Controller is:

  Public Actions GetA () { Var category = db.Causas. To create the list (); Return Jason (Category, Jansenweivist Behavior AloGuget); }  

I do not know what the problem might be and thanks for the help.

Lazy loading of the Causas collection can be closed by making non-virtualization assets

< Pre> publicischooling & lt; Causas & gt; Causas {Get; Set; }

Loading Causas archive can still be avoided by curious loading

  var identity = context.Identificacion. (B = & gt; b.) To create the list ();  

No comments:

Post a Comment