How to allow migration for a console application?
When using asp.net core and ef core, I have no problem when invoking add-migration init . But when I apply the same approach on a console application below, I got an error saying: Unable to create an object of type 'StudentContext'. Add an implementation of 'IDesignTimeDbContextFactory' to the project, or see https://go.microsoft.com/fwlink/?linkid=851728 for additional patterns supported at design time. What is the easiest way to fix this issue? The .net core console application project is as follows: appsettings.json { "ConnectionStrings": { "Storage": "Data Source=storage.db" } } EFCore