Entity Framework 4.1 - EFTracingProvider
问题 Is there a way to make the EFTracing provider work with EF 4.1? EFTracing seems to need an objectcontext and I use dbcontext. Thanks in advance! 回答1: Yes, you can. I'm using the community version with both database-first DbContexts and code-first DbContexts. This answer is based on a discussion thread on the project site. For database-first/designer DbContexts (via ADO.NET DbContext Generator templates), you can simply add the following constructor: public abstract class MyDbContext :