Beispiel #1
0
        public MyBlogMigrationsDbContext CreateDbContext(string[] args)
        {
            MyBlogEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new MyBlogMigrationsDbContext(builder.Options));
        }
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     MyBlogEfCoreEntityExtensionMappings.Configure();
 }