DbContext Configuration Asp.net MVC Core 2.2

Опубликовано: 09 Декабрь 2024
на канале: Programming Tutorials
737
7

EF Core design-time tools such as migrations need to be able to discover and create a working instance of a DbContext type in order to gather details about the application's entity types and how they map to a database schema. This process can be automatic as long as the tool can easily create the DbContext in such a way that it will be configured similarly to how it would be configured at run-time.

While any pattern that provides the necessary configuration information to the DbContext can work at run-time, tools that require using a DbContext at design-time can only work with a limited number of patterns. These are covered in more detail in the Design-Time Context Creation section.