I’ve always wondering about this as from time to time I’ve encountered it with no clear indication where the problem lies.
Typically I’ve solved this by a process of elimination but I was hoping someone could help me with a better way which I could ideally use to provide clearer/more precise error handling?
Any help would be much appreciated.
thx.
p.s. in case it helps I’m developing in C#.
I use sql server profiler for figuring out issues with edmx queries.
And for finding out select queries being generated for linq-to-entity, like in following case,
you can use
EDIT
Dont know anything that MVC provides for EF logging. Even EF does not have a logging built in! (LINQ-to-SQL has a Log property). Found these links which allows you to add logging to EF.
http://blogs.msdn.com/b/jkowalski/archive/2009/06/11/tracing-and-caching-in-entity-framework-available-on-msdn-code-gallery.aspx
or
http://codeclimber.net.nz/archive/2010/12/08/Logging-all-SQL-statements-done-by-Entity-Framework.aspx