Skip to content

Commit 2b1d5bf

Browse files
authored
Merge pull request #89 from microting/copilot/fix-88
Replace obsolete IWebHost and WebHost APIs with modern Host pattern
2 parents cfad3d0 + a2d521f commit 2b1d5bf

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

test/EFCore.MySql.IntegrationTests/Program.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using Pomelo.EntityFrameworkCore.MySql.IntegrationTests.Commands;
3-
using Microsoft.AspNetCore;
43
using Microsoft.AspNetCore.Hosting;
54
using Microsoft.Extensions.DependencyInjection;
65
using Microsoft.Extensions.Logging;
6+
using Microsoft.Extensions.Hosting;
77
using Pomelo.EntityFrameworkCore.MySql.Tests;
88

99
namespace Pomelo.EntityFrameworkCore.MySql.IntegrationTests
@@ -41,11 +41,14 @@ public static void Main(string[] args)
4141
}
4242
}
4343

44-
public static IWebHost BuildWebHost(string[] args)
44+
public static IHost BuildWebHost(string[] args)
4545
{
46-
return WebHost.CreateDefaultBuilder(args)
47-
.UseUrls("http://*:5000")
48-
.UseStartup<Startup>()
46+
return Host.CreateDefaultBuilder(args)
47+
.ConfigureWebHostDefaults(webBuilder =>
48+
{
49+
webBuilder.UseUrls("http://*:5000")
50+
.UseStartup<Startup>();
51+
})
4952
.Build();
5053
}
5154

0 commit comments

Comments
 (0)