public QuestionnaireInvestigationMigrationsDbContext CreateDbContext(string[] args)
        {
            QuestionnaireInvestigationEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <QuestionnaireInvestigationMigrationsDbContext>()
                          .UseSqlServer(configuration.GetConnectionString("Default"));

            return(new QuestionnaireInvestigationMigrationsDbContext(builder.Options));
        }
示例#2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     QuestionnaireInvestigationEfCoreEntityExtensionMappings.Configure();
 }