Using Visual Studio:
-
Open Visual Studio → "Create a new project".
-
Select ASP.NET Core Web API.
-
Configure project name & location.
-
Choose .NET 8 (or latest).
Using Command Line:
dotnet new webapi -n MyFirstApi
cd MyFirstApi
dotnet run
Example: var builder = WebApplication.CreateBuilder(args); // Add services builder.Services.AddControllers(); builder.Services.AddEndpoints...
No comments:
Post a Comment