コード例 #1
0
        public ServerMigrationsDbContext CreateDbContext(string[] args)
        {
            ServerEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new ServerMigrationsDbContext(builder.Options));
        }
コード例 #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     ServerEfCoreEntityExtensionMappings.Configure();
 }