Тёмный

Build a RESTful API in ASP.NET 6.0 in 9 Steps! 

tutorialsEU
Подписаться 96 тыс.
Просмотров 65 тыс.
50% 1

🚀 ASP.NET Masterclass - Master ASP.NET and build powerful web applications using C#: bit.ly/3YI1SAt
Build an entire RESTful API with ASP.NET Web API 6.0 in just 9 steps and only 12 minutes? Find out how in this video! Restful API In ASP.NET using Visual Studio and C#. Want to learn more about ASP.NET 6.0?
Here you got the link!
Get the Source Code from here - github.com/tutorialseu/asp-ne...
What is ASP.NET?
Free. Cross-platform. Open-source.
A framework for building web apps and services with .NET and C#.
.NET is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.
ASP.NET extends the .NET developer platform with tools and libraries specifically for building web apps.
REST is an acronym for REpresentational State Transfer and an architectural style for distributed hypermedia systems. Roy Fielding first presented it in 2000 in his famous dissertation.
Like other architectural styles, REST has its guiding principles and constraints. These principles must be satisfied if a service interface needs to be referred to as RESTful.
The six guiding principles or constraints of the RESTful architecture are:
· Uniform Interface
· Client-server
· Stateless
· Cacheable
· Layered system
· Code on demand
Timestamps
00:00 - 00:35 Intro
00:35 - 01:04 Step 1: Setting up our project
01:04 - 01:25 Step 2: Removing default stuff
01:25 - 02:10 Step 3: Creating our model
02:10 - 04:43 Step 4: Setting up a database
04:43 - 06:00 Step 5: Creating a controller
06:00 - 08:25 Step 6: Create/Edit
08:25 - 09:27 Step 7: Delete
09:27 - 11:04 Step 8: Get
11:04 - 12:05 Step 9: Get all
12:05 - 12:31 Outro
In recent years, it has become clear that HTTP is not just for serving up HTML pages. It is also a powerful platform for building Web APIs, using a handful of verbs (GET, POST, and so forth) plus a few simple concepts such as URIs and headers. ASP.NET Web API is a set of components that simplify HTTP programming. Because it is built on top of the ASP.NET MVC runtime, Web API automatically handles the low-level transport details of HTTP. At the same time, Web API naturally exposes the HTTP programming model. In fact, one goal of Web API is to not abstract away the reality of HTTP. As a result, Web API is both flexible and easy to extend. The REST architectural style has proven to be an effective way to leverage HTTP - although it is certainly not the only valid approach to HTTP. The contact manager will expose the RESTful for listing, adding and removing contacts, among others.
So in this video we will Build an entire RESTful API with ASP.NET Web API 6.0 in just 9 steps and only 12 minutes, watch it and find out how!
#restapi #api #aspnet #visualstudio #csharp
TAGS
restful api in asp.net,coding,programming,api,rest api,visual studio,step by step,rest,restful api,how to code,dotnet,dot net,web api,development,csharp,c# tutorial,webapi,tutorial,tutorialseu,asp,aspnet,aspdotnet,asp net,code,mvc,asp net core,tim corey,dotnet core,asp net core mvc,asp net mvc,asp.net tutorial for beginners,what is api,backend,create a restful api,what is an api,rest api tutorial,what is rest api,restful,restful api tutorial
tutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.
Stay tuned and subscribe to tutorialsEU: goo.gl/rBFh3x
Android: / @tutorialseuandroid
C#: / @tutorialseuc
Unity: / @tutorialseuunity
Facebook: / tutorialseu-1093802040...
LinkedIn: / tutorialseu
Discord: / discord

Опубликовано:

 

1 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 52   
@robertmurrell3852
@robertmurrell3852 7 месяцев назад
I can't tell you how long I've been looking for a resource to teach me how to build an API like I didn't already know how. Thank you so much for this!
@dragonfalcon8474
@dragonfalcon8474 2 года назад
This was actually very helpful. A nice overview, of a subject that can be complex depending on the scale of the project.
@SheCreatesGames
@SheCreatesGames Год назад
I really like how simple and useful this is! Your explanations made RESTful API so easy to understand
@weamhaleemi4984
@weamhaleemi4984 Год назад
Thank you ! super beneficial in just 12 minutes
@estar500
@estar500 11 месяцев назад
Excellent video, I especially like how short and to the point it is.
@publicalias8172
@publicalias8172 Год назад
Really like this style of video. It may not be for absolute beginners how to setup the IDE etc- but there are so many videos covering those topics, we need more hands-on THIS IS HOW TO DO IT videos! lol
@1983jll
@1983jll Год назад
Thank you very much your tutorial makes it easy and also pretty understandable. I can now provide basic API in C#
@Tty490
@Tty490 9 месяцев назад
Thank you for the nice teaching. I had watched another longer video before this one, so was able to understand better than a newcomer would. I had to slow down the video though since it was too fast for me. suggestion - If possible please add a description of what Swagger is and what it does. Thanks
@jeetendraprasadPune
@jeetendraprasadPune Год назад
Nice and Simple for beginners.😃
@Thomaskbird
@Thomaskbird Год назад
Great video, I've been running this code and trying to get the update to work, it seems as though everything is passed correctly but it never updates. Would you be able to provide any feedback on what could be causing this?
@rehamalbulushi520
@rehamalbulushi520 Год назад
your efforts are highly appreciated
@gustigusti2094
@gustigusti2094 10 месяцев назад
Compact and easy to understand. Thanks
@ramseykarr6870
@ramseykarr6870 Год назад
Very good tutorial... keep the videos coming....🙏
@arsarsars1able
@arsarsars1able Год назад
Helpfull video. Thanks and love to watch more to increase my knowledge. If someone was a bignner he can easy learn from this video.
@paultaylor2054
@paultaylor2054 Год назад
you did a great job on this video thank you
@TaiwoAdefala
@TaiwoAdefala Год назад
Thank you, very helpful.... Can you help create a tutorial on how to consume a web service to be used in web api application?
@jasper5016
@jasper5016 Год назад
This is a really good video. I feel that MS unnecessarily made that DbCotext creation lengthy.
@eliy5550
@eliy5550 Год назад
AWESOME TUTORIAL
@a2011q
@a2011q Год назад
Hi, thank you so much, content is very helpfull.
@FG-uk3in
@FG-uk3in 8 месяцев назад
Excellent and very helpful video. Thanks a lot.
@theodorn
@theodorn 2 года назад
Danke schön!
@KwidzaxD
@KwidzaxD 11 месяцев назад
One of the principles of the Restful api is not to use verbs in the Uri so instead of /GetAll it should be /all
@3am.D3v
@3am.D3v 4 месяца назад
Tks , your lesson so ez to follow .
@srinithipanand7476
@srinithipanand7476 Месяц назад
You really helped me out for my work. It was really really really a great help. God Bless.
@yasirsaddiqui8171
@yasirsaddiqui8171 Год назад
Thank you for uploading an easy and quick api learning tutorial. Now i would appreciate if you make another video and connect the same api with sql server db using stored procedure with authentication and authorization. Also the update not working please check.
@boyankrachev1560
@boyankrachev1560 Год назад
Yes, the Update is not working.
@charlesssgraham
@charlesssgraham 10 месяцев назад
Awesome! 🔥
@Nolly_CIA
@Nolly_CIA Год назад
Vielen dank Jannick
@reetyt2017
@reetyt2017 2 года назад
A very simple to create API. One question though: is it ok to access directly the database from controller without using a unit of work or a data transfer object?
@tutorialsEU
@tutorialsEU 2 года назад
Hi, ideally you could create a data-access-layer and a CRUD-interface for accessing data but if you want to keep it easy for simple usage you can access the db directly from controller :-)
@ahmadzrein1867
@ahmadzrein1867 Год назад
thanks is there a video to work api restfull with .net maui
@vaidasrackauskas2371
@vaidasrackauskas2371 Год назад
The fastest and simplest explanation I've seen. Thank you!
@ryansmith6179
@ryansmith6179 2 месяца назад
Hi nice stuff a little bit fast but a good starting point. Thanks
@riccarrasquilla379
@riccarrasquilla379 5 месяцев назад
thanks for the video
@kopilkaiser8991
@kopilkaiser8991 7 месяцев назад
Best teacher in the industry ⭐️👏
@rabinkos
@rabinkos Год назад
Hi I really enjoyed the video and learned a lot. Alas you got a bug. In CreateEdit method you cannot edit data, change context by just _context.SaveChanges() since you are not sending the new value back to db.
@guardadotube
@guardadotube Год назад
I had to add a line of code to detach the state prior to modifying the booking. As below: [HttpPost] public JsonResult CreateEdit(HotelBooking booking) { if (booking.Id == 0) { _context.Bookings.Add(booking); } else { var bookingInDb = _context.Bookings.Find(booking.Id); if (bookingInDb == null) return new JsonResult(NotFound()); _context.Entry(bookingInDb).State = Microsoft.EntityFrameworkCore.EntityState.Detached; bookingInDb = booking; _context.Update(bookingInDb); } _context.SaveChanges(); return new JsonResult(Ok(booking)); }//end CreateEdit
@alpaydemirr
@alpaydemirr Год назад
can i use this api in reactnative
@chriscalver8595
@chriscalver8595 3 месяца назад
Awesome
@StefanoGabriele1983
@StefanoGabriele1983 9 месяцев назад
I don’t think is right to respond 200 and inside the json a 404: shouldn’t we respond 404 as a code result?
@asteekgoswami7733
@asteekgoswami7733 Год назад
sir please make a video of restful api in asp.net with mongodb 🙏🥺🥺
@Wild_cat_lovers
@Wild_cat_lovers 8 месяцев назад
But you didn't told you crested a folder named as data
@tutorialsEU
@tutorialsEU 2 года назад
🚀 ASP NET Masterclass - Master ASP NET and build powerful web applications using C#: bit.ly/3YI1SAt
@hassanqayyum3134
@hassanqayyum3134 2 года назад
make scalable and secure rest API in ASP.Net 6 by following best practices and Architectural Principles.
@leonxrdo6561
@leonxrdo6561 2 года назад
Eiskalt von Coding mit Jannick geklaut
@maksymilianzajac5262
@maksymilianzajac5262 Год назад
you should delete the video
@stickyman18
@stickyman18 2 месяца назад
horrible
@hateem8287
@hateem8287 10 месяцев назад
BookingInDb = booking; won't work since they're reference types C: we can do this instead: bookingInDb.RoomNumbner = booking.RoomNumbner; bookingInDb.ClientName = booking.ClientName; or simply: _context.Bookings.Update(booking);
@paulpich69
@paulpich69 Год назад
When I get to entering using Microsoft.EntityFrameworkCore; it tells highlights that namespace in red. Do you need to install any prerequisite package?
@usamaafzal5482
@usamaafzal5482 Год назад
Saved My Day
@proqnex
@proqnex Год назад
For anyone update wasn't work use this. if (booking.Id == 0) { _context.Bookings.Add(booking); }else if(booking.Id == null) { return new JsonResult(NotFound()); } else { _context.Bookings.Update(booking); } _context.SaveChanges(); return new JsonResult(Ok(booking));
Далее
What is a REST API?
9:12
Просмотров 1,4 млн
Is LEARNING ASP.NET still WORTH it in 2023?
9:43
Просмотров 37 тыс.
Create A Python API in 12 Minutes
12:05
Просмотров 545 тыс.
Background Jobs in ASP.NET Core
18:35
Просмотров 43 тыс.
Rust's Alien Data Types 👽 Box, Rc, Arc
11:54
Просмотров 132 тыс.
Is LEARNING WPF still WORTH it in 2023?
10:59
Просмотров 36 тыс.