Example #1
0
        public WeChatManagementSampleMigrationsDbContext CreateDbContext(string[] args)
        {
            WeChatManagementSampleEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

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