I am getting this error when attempting to use a Web API controller.
Web API Error: The \'ObjectContent`1\' type failed to serialize the response body
If you don't need the lazy-loaded navigation properties provided by the proxy class (System.Data.Entity.DynamicProxies.Student_4C97D068E1A...
), you can disable their generation by setting:
unitOfWork.Configuration.ProxyCreationEnabled = false;
What to do if you need the proxy class is another question.
Follow these links for a good overview of lazy loading and proxies:
I usually disable lazy loading and proxies by default, and enable one or both in specific code blocks that need them.