Following error occurred when trying to convert entity object into JSON String. I\'m using C# MVC4 with code first DB designing. It seams its because FKs and relationships b
I was having the same issue, what I have done is have passed only needed column to view , In my my case. only 2.
List lstSubCategory = GetSubCateroy() // list from repo
var subCategoryToReturn = lstSubCategory.Select(S => new { Id = S.Id, Name = S.Name });
return this.Json(subCategoryToReturn , JsonRequestBehavior.AllowGet);
Circular reference detected exception while serializing object to JSON