Esempio n. 1
0
        public SmartPowerMigrationsDbContext CreateDbContext(string[] args)
        {
            SmartPowerEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new SmartPowerMigrationsDbContext(builder.Options));
        }
Esempio n. 2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     SmartPowerEfCoreEntityExtensionMappings.Configure();
 }