官术网_书友最值得收藏!

Program.cs

Like C# console applications, ASP.NET Core has the Program class, which is an important class that contains the entry point to the application. The file has the Main() method used to run the application and it is used to create an instance of WebHostBuilder for creating a host for the application. The Startup class to be used by the application is specified in the Main method:

 public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}

public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();
}
主站蜘蛛池模板: 大田县| 沛县| 环江| 湘西| 台湾省| 尉氏县| 平凉市| 德化县| 常州市| 土默特右旗| 清远市| 博乐市| 滁州市| 盐津县| 隆子县| 宜昌市| 嘉黎县| 大荔县| 金昌市| 华宁县| 武城县| 沈阳市| 城步| 皋兰县| 邵武市| 涿州市| 和田市| 松滋市| 新乡县| 平安县| 钦州市| 诏安县| 黄平县| 长春市| 库尔勒市| 平潭县| 东丰县| 菏泽市| 重庆市| 鹰潭市| 康定县|