コード例 #1
0
        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();
 }