mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-26 10:43:35 +02:00
Migrate aspnet-mssql sample to .NET 5 🚀 (#143)
* Updated MVC app to .NET 5 Signed-off-by: GitHub <noreply@github.com> * Added SQL Server health check Signed-off-by: GitHub <noreply@github.com> * Updated README.md files with ASP.NET samples Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
c8370c40c6
commit
6ba8ef4937
9 changed files with 495 additions and 61 deletions
31
aspnet-mssql/app/aspnetapp/Program.cs
Executable file → Normal file
31
aspnet-mssql/app/aspnetapp/Program.cs
Executable file → Normal file
|
@ -1,24 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using aspnetapp;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace aspnetapp
|
||||
class Program
|
||||
{
|
||||
public class Program
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateWebHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseStartup<Startup>();
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue