コード例 #1
0
        public EventOrganizerMigrationsDbContext CreateDbContext(string[] args)
        {
            EventOrganizerEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

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