Це відео не доступне.
Перепрошуємо.
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
Join the Discord community to chat with other devs and get help if you're stuck on something.
discord.gg/dcvmDnegsn
thank you so much. please could you add admin login?
This is excellent -- thank you Ruben...
This is really great. Thanks for taking the time to make this video, I really appreciate it !
Thanks John, glad to hear it was useful!
this is very good. many many thanks.
Thanks! Glad you enjoyed it.
Excellent tutorial. Thank you!
Thanks! You're welcome!
Thank you sir
Thanks Ruben - Very helpful video. Glad it was done in .NET 6
Thanks!
Amazing tutorial..thanks.
Thanks!
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.
Thanks for your feedback. I agree with you but I'm a little worried about video length. I'll consider it for future videos.
@@RubenHeerenDev Thank you, looking forward to.
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.
Thanks! Sure, I'll create it soon.
I have listened! My latest video is about that.
Link: ua-cam.com/video/jkaUO-39gHI/v-deo.html
@@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.
@@fieryscorpion Thanks for the suggestion! Added it to the list.
@@RubenHeerenDev Thank you!
I noticed that clicking the Cancel button on the Create page does create/update the record. I'm guessing it's the binding?
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.
Cool man!!! 😎
Thanks!
Now with subtitles!
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
Hi Marcel I think I answered you in the Discord.
@@RubenHeerenDev got it thanks 👍
Hello, are you planning some new tutorials with blazor?
Hey yes my next tutorial will be about Blazor and Stripe.
@@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
@@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
@@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
@@tomaszalczyk Weird. Thanks for sharing!