Перейти к содержимому

I Built My First .NET CRUD API From Scratch | C# & ASP.NET Core

NawangCodes365

0:00 / 0:00

I Built My First .NET CRUD API From Scratch | C# & ASP.NET Core

176 просмотров · 2 недели назад
NawangCodes365
19 подписчиков
176 просмотров · 2 недели назад
Link of the .net SDK 10.0: https://dotnet.microsoft.com/en-us/do... Command for creating dotnet webapi: dotnet new webapi -n "MyFirstCRUDAPI" Terminal swagger command : dotnet add package Swashbuckle.AspNetCore Command for adding swagger: builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); app.UseSwagger(); app.UseSwaggerUI(); In this video, I build my first .NET CRUD API completely from scratch using C# and ASP.NET Core. I’m learning .NET and backend development, so instead of just following a tutorial, I wanted to actually build the API and understand what each part does. In this project, we cover: Creating a .NET Web API project Understanding the project structure Creating a Product model Creating a Product Controller Understanding controllers and HTTP requests GET — Get all products GET by ID — Get a specific product POST — Create a product PUT — Update a product DELETE — Delete a product Testing the API using Swagger For this first project, I’m using an in-memory list instead of a database. Connecting the API to a real database will be the next step. If you’re also learning C#, .NET, ASP.NET Core, or backend development, hopefully this gives you a practical starting point. Thanks for watching! 🚀 #dotnet #csharp #aspnetcore #webapi #crud #backenddevelopment #programming