Search code examples
.netentity-framework-core.net-7.0ef-power-tools

.NET 7 console application using EF Core 7 why no OnConfiguring?


I built a database first .NET 7 and EF Core 7 application and used the EF Power Tools to create the context and model classes. I keep reading about OnConfiguring() being in the context class. I only have OnModelCreating()? What did I do wrong?


Solution

  • Nothing. You can still override DbContext.OnConfiguring in your context if you want to but with modern patterns using DI it is rarely needed (unless you are using something like interceptors).

    See also: