Add-Migration without parameterless DbContext and DbContextFactory constructor
问题 My application has no parameterless constructor at my DbContext implementation and I don't like to provide a parameterless constructor to a IDbContextFactory<> implementation. The reason is I want to keep control where the DbContext points to. That's why all my constructors will ask for the ConnectionStringProvider. public class MyDbContext : DbContext { internal MyDbContext(IConnectionStringProvider provider) : base(provider.ConnectionString) {} } and public class MyContextFactory :