public MyBookStoreMigrationsDbContext CreateDbContext(string[] args)
        {
            MyBookStoreEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new MyBookStoreMigrationsDbContext(builder.Options));
        }
Example #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     MyBookStoreEfCoreEntityExtensionMappings.Configure();
 }