Updating resources with PUT | ASP.NET Core 5 REST API Tutorial 6

preview_player
Показать описание

Hello everybody I'm Nick and today I will show you how you can completely replace a resource in a RESTful API using PUT.

Don't forget to comment, like and subscribe :)

Social media:

#tutorial #rest #api
Рекомендации по теме
Комментарии
Автор

Incredible series so far, looking forward to the rest.

donoboyle
Автор

This is an awesome series so far, very nice.

NavneetKumar-fsmc
Автор

Very good all your videos, I'm watching it and i will go untill the end of this series. It is helping me a lot to learn c#. Thank you so much.

Gomide
Автор

Should we create a PostResponse (or another class with the necessary properties and an appropriate name) from the Update method instead of a Post? That would help cement that contract I think by keeping both the request and the response separate from our domain Post object.

WarrenGarabrandt
Автор

Nick, thanks for all this, I have a small technical question, for the CreatePost, why don't you create the Post object inside the PostService instead of creating it in the controller?, would not that separate levels even more leaving the model, and services kind of at the same level and the controllers at a higher level? What do you think? I see it like if the controller level does not need to know the POST model at all, only deal with the PostService... is not that the idea when we are injecting the service into the controller? Thanks!!

reyrrob
Автор

Hey Nick. Is it good practice to separate update methods to PATCH/PUT? As i know, PUT is designed to fully replace resource, PATCH - for patching existing resources. But all projects I saw are using PUT and don't really care about PATCH. What do you think?

volt
Автор

Do you have any plan to cover how load balancing can be done for API? Plus, when is ur next tutorial coming and in which topic?

quazirafi
Автор

I'm getting a 405 error. Can you help me?

farukseyhan
Автор

could you make a tutorial on entity framework aswell?

jawadahmed
Автор

Make a video on json patch using dapper

KunalMukherjee