Reputation: 53
I've a project using code first approach and EntityFramework 5.0 and im willing to add tracing but haven't gone far, i've read this link but im unable to make it work using DbContext approach. Original EF Tracing/Caching was written using ObjectContext and after reading thru lots of pages i still can't figure out how to make it work properly. In the link provided above, i'm getting an error not finding NorthwindContext.
Can someone provide some insight on where and how to compile a working solution using EFTracing with DBContext? A code Sample would be a huge help.
Thanks, Ricardo
Upvotes: 3
Views: 2191
Reputation: 31620
There are some hoops you need to jump through. I blogged about this here: http://blog.3d-logic.com/2012/03/31/using-tracing-and-caching-provider-wrappers-with-codefirst/. Hopefully it will help you resolve your problem.
EDIT
EF6 now contains a built-in mechanism for logging/tracing. From more details see the feature specification and this blog post.
Upvotes: 3