I have an ApiController that works with Entity Framework objects. The particular object I am trying to return on the GET request has almost a dozen Navigation Properties.
When I return the list of EF objects, it serializes all navigation properties, which results in a ridiculous amount of time being taken serializing the object,
public IEnumerable<EFObject> Get()
{
IEnumerable<EFObject> EFObjects=
db.EFObject;
return EFObject;
}
How can I prevent MVC from serializing these navigation properties?
I have tried this and it did not work.