Search code examples
c#entity-frameworkdatabase-migration

How to generate Entity Framework migrations with multiple DbContext in single c# project?


Could I create multiple migrations to every different dbContext class in single project?

I have a repository project which provide multiple dbContext classes to different project usage.

How should I manage these dbcontext migrations?


Solution

  • You can specify the Context(Type) in all commands with the -ContextTypeName <string> parameter.