Exemplo n.º 1
0
        public BlogMigrationsDbContext CreateDbContext(string[] args)
        {
            BlogEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new BlogMigrationsDbContext(builder.Options));
        }
Exemplo n.º 2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     BlogEfCoreEntityExtensionMappings.Configure();
 }