Any plans to support IDesignTimeDbContextFactory?

edited December 2018
Hello. There is a DbContextPooling support appeared in EF Core 2.0 ( which requires that DbContext class has only one constructor. So to be able load implemented DbContext in LinqPad I need other implementation, that accept connection string (as there are no app.config file for .net core project). There are recommended way for design-time DbContext instantiation with design-time connection string ( Do you have any plans to support IDesignTimeDbContextFactory in future?


  • Does it help if you make the constructor for LINQPad protected instead of public?
  • Yes, it helps, thank you. But I decided to pick another approach, and created separated DesignTimeDatabaseContext, derived from primary DatabaseContext in order to separate any design-time information from main context. For example:
    - OnConfiguring method, needed for LinqPad only
    - All DbSet properties, as we have only aggregation roots in main context, but it is more handy to have all DbSets in design-time to access from LinqPad.
Sign In or Register to comment.