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

            var configuration = BuildConfiguration();

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

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