CRUD with Blazor in .NET 7 🔥

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


💻 Use Code LONGERNIGHTS to get 20% off on any course or plan!

Table of Contents:
00:00 CRUD with Blazor in .NET 7 🔥
01:35 Create a Service (utilizing the Repository Pattern & Dependency Injection)
07:35 Implement the GetProducts() Method
10:38 Get all Products on the Products Page
15:51 Use the life cycle method OnInitializedAsync()
17:22 Get a single Product by Id
19:47 Create the Product Page
27:34 Add an EditForm to create or update a product
34:11 Add Create Button to Products Page
36:05 Implement Create & Update in the ProductService
40:58 Delete Implementations

#PatrickGod #Blazor #DotNet
Рекомендации по теме
Комментарии
Автор

Where can i find the video where you do the Server side?

erkanstundkvist
Автор

38:28 @Patrick God, is correct insert navigation manager into service ?
Shouldn't it be placed in the Blazor component?

Totti
Автор

Would you consider adding DTOs to future videos with API development so they more closely resemble Industry level work? That would be a huge help!

DjangoBruh
Автор

Hello Patrick Sir, You have been amazing Teacher regarding the .NET Web Api Series. I have purchased the blazor ecommerce as well. I had 1 simple doubt regarding the CORS policy for .NET 7. I have done many research regarding this but i was not able to get even though i followed the documentation of Microsoft. Any suggestion would be fine. Thank you

tonysimpson
Автор

Thank you very much for your invaluable contents. Keep up this great work!

CrisDiSclafani
Автор

what if i created a standalone blazor wasn project that calls what i believe is an api.net api project. can i retroactively have my api serve my blazor files?

path_selector
Автор

Thanks for this. Suppose I have a custom validation that uses Dictionary<string, List<string>> that is being returned by the Server, how would I handle it on the service layer of the client? should my Create/Update method return a Dictionary that contains the error? or its better to throw exception? Thanks!

serverdown
Автор

Hi Patrick, thank you for another Blazor CRUD video. I was wondering if you could make a video about a CRUD page for one entity which multiple foreigns keys in it ?

We only work with one foreign key. I believe that the @code section in the product page is a lot different when we want to use multiple foreigns key. For example a customer with FK CustomerTypeId, AddresstypeId and for exampleTariffGroupId (different charges based on tariffGroup), which in the SQl are entitities on it's own, but in the Create page everything is combined.

timv
Автор

Thank you Patrick for this wonderful and clear video tutorial. :)

louiidelosreyes
Автор

Patrick, would it be possible to make a video on things like Azure and what we should know as developers in Azure?

DjangoBruh
Автор

good initial study, but a real app requires mapping between 2 to 3 database entities, such as order, stock and good sql in the relationship between tables.

FGomesFabio
Автор

thx for your video, i have a question: why create the services both in the client and server? and also creating the same dependencies again in the client and server?

sebastianmantelli
Автор

How would you get the userid in the aspnetuser table when you add authentication and add it with the crud?

MrDritzii
Автор

Are there any lectures on "asp net core identity individual user accounts" in your lectures?
abount setting role, change user id string to int etc....

jys
Автор

Hi Patrick, could you share the demo code for this project?

godfreykuboi
Автор

I am curious about typical Blazor WASM standards for these front-end services. Is it preferable to call your API every time a page or component wants to access the Products listing? Or is more preferable to manage the state of the Products on the front end? So whenever you do a CRUD operation you are sending data to the API but also just updating/reading from to your local Product collection, that way you don't need to fetch the entire collection again every time a component wants to know about Products.

I can't find too many tutorials or in depth standards for Blazor state management or what a good pattern is. Would be a good video idea to follow up on.

clowch
Автор

There is no github repo... invalid link

leonidmisak