1. ASP.NET Core란?

<aside> ✏️ ASP.NET Core는 최신 클라우드 사용 인터넷 연결 앱을 빌드하기 위한 플랫폼 간 고성능 오픈 소스 프레임워크입니다. -Microsoft-

</aside>

macOS, Linux 및 Windows에서 사용할 수 있으며 C#을 사용해 개발할 수 있다.

한마디로 ASP.NET CORE는 웹서버를 만들 수 있는 프레임워크이다.

- ASP란?

Active Server Pages의 약자로 동적으로 서버에서 작동하는 페이지를 뜻한다. HTML은 이와 반대로 정적인 페이지에 해당한다.

2. ASP.NET Core 구조

Untitled

- Startup 클래스(.NET 6 이전 버전)

.NET 6 이후 버전은 Stratup 클래스가 없어지고 Program.cs가 프로그램의 시작점이 된다.

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddControllers();

var app = builder.Build();

app.UseRouting();

app.UseEndpoints(endpoints => { endpoints.MapControllers(); });

IConfiguration configuration = app.Configuration;
DBManager.Init(configuration);

app.Run(configuration["ServerAddress"]);

WebApplication.CreateBuilder(String[])

builder.Services.AddControllers()

builder.Build()

app.UseRouting()

app.UseEndpoints()

Untitled

3. 미들웨어