public SzyBlogMigrationsDbContext CreateDbContext(string[] args)
        {
            SzyBlogEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

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