The error basically tells you, that u have no class implementing the IDesignTimeDbContextFactory.
To solve this issue create a class implements the interface, that could look like following:
public class Foo : IDesignTimeDbContextFactory<MyContext> {
//Add interface methods here
}
That should solve the issue, because then u have your class Foo which implements this interface, which seems to be necessary.
Option2
If that does not help in any case, please check if your class "MyContext" inherits from DbContext.
Your class should look like the following:
public class MyContext : DbContext {
//some stuff here
}
Option3
You may have missed to edit your Startup.cs
The tutorial tells you to add the following into your Startup.cs file in order to register your context
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
var connection = @"Server=(localdb)\mssqllocaldb;Database=EFGetStarted.AspNetCore.NewDb;Trusted_Connection=True;";
services.AddDbContext<MyContext>(options => options.UseSqlServer(connection));
}