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

            var configuration = BuildConfiguration();

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

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