CRUD with Blazor SSR (Static Server-Side Rendering) in .NET 8 🔥

🚀 Join the .NET Web Academy: learn.dotnetwebacademy.com
💖 Support me on Patreon for exclusive source code access: / _patrickgod
🚀 Get the .NET 8 Web Dev Jump-Start Course for FREE: dotnet8.patrickgod.com
🐦 Let's get social on Twitter/X: / _patrickgod
🔗 Let's connect on LinkedIn: / patrickgod
Table of Contents:
00:00 CRUD with Blazor SSR (Static Server-Side Rendering) in .NET 8 🔥
01:26 Creating the Blazor Web App Project
02:44 Defining the Entity
04:22 Entity Framework Boilerplate
11:56 Running Code-First Migrations
14:30 Building a New Page for Video Game Display
24:28 Stream Rendering for Enhanced User Experience
26:07 Read a Single Entry
34:22 Create a Video Game
41:33 Update a Video Game
43:41 Delete a Video Game
48:43 Adding Enhanced Navigation
#DotNet #Blazor #AspNetCore

Пікірлер: 36

  • @shahnawazk
    @shahnawazk7 ай бұрын

    Nice and Precise! Thank you and keep it up.

  • @travisholt5484
    @travisholt54845 ай бұрын

    Very informative and very well done, as usual. SSR is super cool! I have several Blazor server-side apps I will be migrating to SSR. I've always appreciated the simple architecture of Blazor server-side. SSR to me is server-side without the websockets dependency, which, as you know presented scaling issues. Can't wait to see more of your vids! Keep up the great work!

  • @spmaurya1318
    @spmaurya13187 ай бұрын

    Excellent video first time watching blazor video although I work with netcore, but it was pretty well explained and easy to understand

  • @atirah14
    @atirah147 ай бұрын

    Completed the video. Thanks for teaching. I am your student. I've purchased your blazor course in udemy.

  • @KNPhilip
    @KNPhilip7 ай бұрын

    Hi Patrick. Thanks for covering different topics regarding Blazor and .NET 8 in general. Could you possibly make some content covering the new .NET Aspire? That would be very much appreciated :)

  • @charliehager5458
    @charliehager54587 ай бұрын

    Thanks Patrick, excellent video. Back in time to 1996! Just a lot faster and smarter. It is going to be interesting to see how web sites mix and match the different rendering modes in a single project. Fun stuff. What ever happen to buying you a cup of coffee??? I can't find the link.

  • @ankeshankur3058
    @ankeshankur30586 ай бұрын

    Hi, nice video, When video game data is saved then can i navigate to list page using navigation manager. Because i try i gives error

  • @wusswuzz5818
    @wusswuzz58185 ай бұрын

    Hi @PatrickGod, I see that the crud does not work unless you do this special thing "Model.prop ??= something" , where did you get this bit of information and do you know why it is the case. How should this work with non-nullable properties like int's and bools? as "Model.myintorbool ??= something" would give an error.

  • @minimalstory
    @minimalstory7 ай бұрын

    We need New blazor Web app auth))

  • @baturhankahraman426
    @baturhankahraman4267 ай бұрын

    Hello Patrick, A little feedback here. Navigating to same page is not a good practice to apply. Instead of it, if your video game entity is deleted successfuly, you can also delete it from your list of videogames and trigger statehaschanged() thus blazor is going to re-renders the places which changed. Thank you for the video. Regards

  • @ankeshankur3058

    @ankeshankur3058

    6 ай бұрын

    Can i navigate to another page..?

  • @baturhankahraman426

    @baturhankahraman426

    6 ай бұрын

    @@ankeshankur3058 yes you can

  • @maxinoume

    @maxinoume

    2 ай бұрын

    @@ankeshankur3058 You can do anything you want.

  • @MohammadKomaei
    @MohammadKomaei7 ай бұрын

    Please get the github link.

  • @MarkoMijuskovic
    @MarkoMijuskovic7 ай бұрын

    Hi Patrick, would it be possible for you to show us how can Blazor be integrated into an existing .net MVC app? Many of us have existing project and do not work regularly on greenfield stuff. Can you create a tutorial on how would you slowly migrate an existing MVC project into a Blazor SPA app. Is it even possible to have certain parts of the page be Blazor components while other parts are just regular MVC Razor pages? I think this would be a very useful video considering that there is very little material to be found on the internet about project migration to Blazor...

  • @tringadesku6065

    @tringadesku6065

    7 ай бұрын

    yes this would be helpful!

  • @JtendraShahani
    @JtendraShahani7 ай бұрын

    How can we display a delete confirmation dialog in Blazor SSR?

  • @harafz

    @harafz

    4 ай бұрын

    Because WASM runs on the browser and SSR runs on the server. WASM is limited to the browser’s capabilities.

  • @kennethsmith2606
    @kennethsmith26067 ай бұрын

    Blazor Server strongly recommends using DbContextFactory and not DbContext to ensure data integrity. Is it ok to use a simple DbContext in the new .NET 8?

  • @FascistTrex

    @FascistTrex

    7 ай бұрын

    Why? Isn't usng transactions enaugh?

  • @atirah14
    @atirah147 ай бұрын

    While editing, for Release year, in the edit operation -- there is an error ??= cannot be applied to operands of type 'int' and 'int' CS0019. How can i solve this. You dont have this error.

  • @atirah14

    @atirah14

    7 ай бұрын

    The release year has to be a nullable integer for this code to work. Error solved, when model was changed to what you showed in video.

  • @dmtuan
    @dmtuan4 ай бұрын

    How can Blazor SSR work with injectedservices and dbcontext, but Blazor WASM can’t? (In your Blazor WASM CRUD tutorial you used HttpClient and had to build the api.

  • @trflashedwall9356

    @trflashedwall9356

    2 ай бұрын

    Wasm runs on a process in the Browser and communicates over http. Blazor Server connects via Websocket and sends/receive data via socket. SSR gets processed on the server and and the server sends a html static file to the Browser.

  • @s4lish
    @s4lish5 ай бұрын

    Sorry But I didn't understand why should use ??= operator for update. and If we have 100 properties should write 100 times ?

  • @dhanviakash726

    @dhanviakash726

    19 күн бұрын

    OnParametersSetAsync will also be called when updating the video game, as it is set from the form parameter. If we do not use ??=, our current video game details will be overridden with the database details, causing us to lose the user-submitted information. Therefore, we check if the video game properties are null (which will only be the case when creating a new game). If they are not null, we will not update our current video game and will instead use the user-submitted details.

  • @dovh49
    @dovh497 ай бұрын

    I was excited about Blazor SSR but it appears that HTMX is still better.

  • @StateHasChanged

    @StateHasChanged

    2 ай бұрын

    Why not both?

  • @atirah14
    @atirah147 ай бұрын

    699 $ for your course, is ver steep for an indian in indian currency. Would you consider, continent specific pricing?

  • @PatrickGod

    @PatrickGod

    7 ай бұрын

    Thank you for your interest in the .NET Web Academy! I'm currently working on adjusting the pricing to make it more accessible globally. Stay tuned for the reopening of enrollments with these new options. Your feedback is greatly appreciated! Take care, Patrick

  • @kristiadhy

    @kristiadhy

    7 ай бұрын

    Please consider Indonesia too@@PatrickGod

  • @rankarat
    @rankarat7 ай бұрын

    Hi patrick, is this the regular built in dark them of Visual Studio? BTW, thanks for this video.

  • @trflashedwall9356

    @trflashedwall9356

    2 ай бұрын

    Its the standard but with the option "colored brackets"

  • @atirah14
    @atirah147 ай бұрын

    Completed the video. Thanks for teaching. I am your student. I've purchased your blazor course in udemy.