示例#1
0
        public LoggingManagementSampleMigrationsDbContext CreateDbContext(string[] args)
        {
            LoggingManagementSampleEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new LoggingManagementSampleMigrationsDbContext(builder.Options));
        }
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     LoggingManagementSampleEfCoreEntityExtensionMappings.Configure();
 }