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?
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:
OnConfiguring
enable Include connection string in generated code option (note that this should not be used in production level apps)