Is there a way of changing the location of the Migrations/Configuration.cs file to another location without breaking EntityFramework migrations?

有帮助吗?

解决方案

Of course, migration functionality is not dependent on where the Configuration.cs file is. You may freely move it. When you call migration scripts it will still search for Configuration class in whole project. Remember only about properly setting MigrationsDirectory property within Configuration class - it points to folder where you have your migration classes defined.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top