Entity Framework Pitfalls: DbConfiguration Classes Are Automatically Loaded

added by Ricardo Peres
10/4/2015 9:12:55 PM

314 Views

Entity Framework, since version 6, allows us to specify certain aspects of its configuration by code through a DbConfiguration-derived class. This configuration can be specified in one of three ways: However, if there is a DbConfiguration-derived class in the same assembly as your DbContext, it will be automatically set as the configuration class, provided that: It has a public parameterless constructor.


0 comments