Це відео не доступне.
Перепрошуємо.

Blazor tutorial - CRUD app in ~30 minutes v2

Поділитися
Вставка
  • Опубліковано 15 сер 2024
  • Learn how to build a minimal Blazor Server CRUD web application and publish it to the Microsoft Azure cloud.
    The application showcases how to do the database CRUD operations (Create, Read, Update and Delete) on a simple "Post" model which exists in a SQLite database. The database is generated by using a code-first approach with Entity Framework Core.
    So for the technologies we'll use the .NET 6 LTS Version, C# 10, Visual Studio 2022 Preview, ASP.NET Core Blazor Server, Entity Framework Core, SQLite, Bootstrap for the UI and Microsoft Azure because we'll be publishing this application to a free tier Azure App Service resource.
    This video is the second iteration of this tutorial: • Blazor tutorial - CRUD...
    This tutorial is just a quick overview, if you want a full explanation of Blazor and surrounding technologies check out my course linked below.
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ►► Blazor - Real World Developer Portfolio Course Discount Link:
    rubenheeren.co...
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ►► DOWNLOAD SOURCE CODE:
    github.com/Rub...
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ►► LIVE DEMO:
    crud30mins.azu...
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ►► LINKS MENTIONED:
    Microsoft Docs ASP.NET Core Blazor Server with Entity Framework Core (EFCore):
    docs.microsoft...
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ►► TIMESTAMPS
    0:00 - Intro & Demo
    2:48 - Creating the Solution and Project
    3:41 - EF Core Code First SQLite Database
    12:43 - Implementing Displaying All Posts
    21:33 - Implementing Deleting Posts
    25:43 - Implementing Creating Posts
    33:20 - Implementing Updating Posts
    36:57 - Publishing to Azure App Service (free)
    40:54 - Closing Thoughts
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ►► CREDITS
    Lively Animated Desktop Wallpaper Software:
    github.com/roc...
    Motherboard Background Image:
    unsplash.com/@...
    Visit my website (example of what you can build with ASP.NET Blazor):
    rubenheeren.com
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    Good luck on your developer journey!
    #aspnetcore #blazorserver #crud

КОМЕНТАРІ • 37

  • @RubenHeerenDev
    @RubenHeerenDev  2 роки тому +2

    Join the Discord community to chat with other devs and get help if you're stuck on something.
    discord.gg/dcvmDnegsn

    • @abobonickname5696
      @abobonickname5696 2 роки тому

      thank you so much. please could you add admin login?

  • @nutsaboutnets1935
    @nutsaboutnets1935 Рік тому +1

    This is excellent -- thank you Ruben...

  • @johnmitchell5206
    @johnmitchell5206 2 роки тому +1

    This is really great. Thanks for taking the time to make this video, I really appreciate it !

    • @RubenHeerenDev
      @RubenHeerenDev  2 роки тому +1

      Thanks John, glad to hear it was useful!

  • @mrt7948
    @mrt7948 2 роки тому +1

    this is very good. many many thanks.

  • @MichaelTroulis
    @MichaelTroulis 2 роки тому +1

    Excellent tutorial. Thank you!

  • @yosua7893
    @yosua7893 2 роки тому +1

    Thank you sir

  • @MarkInChicago
    @MarkInChicago 2 роки тому

    Thanks Ruben - Very helpful video. Glad it was done in .NET 6

  • @mesutdemirci7933
    @mesutdemirci7933 2 роки тому +1

    Amazing tutorial..thanks.

  • @allthecommonsense
    @allthecommonsense 2 роки тому +2

    IMO any "CRUD" demo really needs to also show how to do an update with a dropdown list (in this case maybe a "category" where the post lives)... because filling the dropdown's values, initializing the dropdown's selected item with the index value that exists in the DB already, and then updating the DB with the newly selected index (i.e. instead of the text value) is very common, and not as trivial as just updating a simple string value.

    • @RubenHeerenDev
      @RubenHeerenDev  2 роки тому +1

      Thanks for your feedback. I agree with you but I'm a little worried about video length. I'll consider it for future videos.

    • @mrt7948
      @mrt7948 2 роки тому

      @@RubenHeerenDev Thank you, looking forward to.

  • @jono261970
    @jono261970 2 роки тому +3

    Amazing tutorial - any chance you could create a full stack example of CRUD using web assembly and ASP core Web API? Thanks again for providing excellent content.

    • @RubenHeerenDev
      @RubenHeerenDev  2 роки тому +1

      Thanks! Sure, I'll create it soon.

    • @RubenHeerenDev
      @RubenHeerenDev  2 роки тому +1

      I have listened! My latest video is about that.
      Link: ua-cam.com/video/jkaUO-39gHI/v-deo.html

    • @fieryscorpion
      @fieryscorpion 2 роки тому +1

      @@RubenHeerenDev A quick question: What's the difference between using normal .NET Core Web API vs using Blazor Server as the backend? Any advantages, use cases etc. on choosing one over the other?
      If you have time, would love a video on that topic.

    • @RubenHeerenDev
      @RubenHeerenDev  2 роки тому +1

      @@fieryscorpion Thanks for the suggestion! Added it to the list.

    • @fieryscorpion
      @fieryscorpion 2 роки тому

      @@RubenHeerenDev Thank you!

  • @matthewjanofsky5967
    @matthewjanofsky5967 2 роки тому +1

    I noticed that clicking the Cancel button on the Create page does create/update the record. I'm guessing it's the binding?

    • @RubenHeerenDev
      @RubenHeerenDev  2 роки тому

      Thanks for bringing that up. I've noticed it too on other projects. It can be fixed by adding *type="button"* to non-submit buttons in EditForms.

  • @ALiHameedAlHashemi
    @ALiHameedAlHashemi 2 роки тому +1

    Cool man!!! 😎

  • @RubenHeerenDev
    @RubenHeerenDev  2 роки тому

    Now with subtitles!

  • @marcelheijmans5472
    @marcelheijmans5472 2 роки тому

    i tried joining the dicord, but im met with errors, i am running into some problems, i am trying to use the powershell for the dotnet ef migrations command, but it just throws me errors, and i cannot get past this part, i would love some assistance :D

  • @tomaszalczyk
    @tomaszalczyk 2 роки тому

    Hello, are you planning some new tutorials with blazor?

    • @RubenHeerenDev
      @RubenHeerenDev  2 роки тому +1

      Hey yes my next tutorial will be about Blazor and Stripe.

    • @tomaszalczyk
      @tomaszalczyk 2 роки тому

      @@RubenHeerenDev Im waiting. Meanwhile i have a problem with update section. When i puch update button, ive got an error: "System.ArgumentException: The key value at position 0 of the call to 'DbSet.Find' was of type 'int', which does not match the property type of 'decimal'." But the Id in my DB is int. Maybe You can help with that

    • @RubenHeerenDev
      @RubenHeerenDev  2 роки тому +1

      @@tomaszalczyk Hey Tomek,
      I'm not sure why that happens, I'd have to see the code. I found this StackOverflow post with the same problem, maybe that helps:
      stackoverflow.com/questions/71276265/argumentexception-the-key-value-at-position-0-of-the-call-to-dbsetnews-find

    • @tomaszalczyk
      @tomaszalczyk 2 роки тому +1

      @@RubenHeerenDev i solved it, but i dont understand why its that. I changed Parameter ServerID to decimal, and also page to update/{ServerId:decimal}... but on DB its int :D

    • @RubenHeerenDev
      @RubenHeerenDev  2 роки тому +1

      @@tomaszalczyk Weird. Thanks for sharing!