I have a project that uses .net core 2.0 with EntityFrameworkCore, Docker and SQL Server.
I can't get migrations to work. When I try Add-Migration InitialCreate
I get the following error:
Startup project 'docker-compose' is a Docker project. Select an ASP.NET Core Web Application as your startup project and try again.
I don't even have a asp.net web application but just a .net core console program. How do I enable migrations?
If I change the startup project to the console application I get:
Unable to create an object of type 'ApplicationDbContext'. Add an implementation of 'IDesignTimeDbContextFactory' to the project, or see https://go.microsoft.com/fwlink/?linkid=851728 for additional patterns supported at design time.
IDesignTimeDbContextFactory
? – bricelam Feb 5 '18 at 17:23