Пример #1
0
        public SampleMigrationsDbContext CreateDbContext(string[] args)
        {
            SampleEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new SampleMigrationsDbContext(builder.Options));
        }
Пример #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     SampleEfCoreEntityExtensionMappings.Configure();
 }