Reputation: 2674
I am trying to fill gridpanel to get data from database through LINQ in .net framework 3.5 MVC and in Extjs MVC.
I am able to archive to get all data sucessfully from following code
public Object Get()
{
var employeeList = _db.Employees;
var result = new
{
data = employeeList
};
return this.Json(result, JsonRequestBehavior.AllowGet);
}
but when i am passing data to extjs model it will give following Error
I am able to get my all data from database but Don't know where I am wrong?
Upvotes: 1
Views: 12714
Reputation: 17470
The circular reference is caused by the Json serialization.
See my post here: Preventing StackOverflowException while serializing EF object graph into Json
This post might also help you: EntityFramework to Json workaround?
Upvotes: 4