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

            var configuration = BuildConfiguration();

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

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