Blazor Server Full CRUD Operations From Scratch Incl. EF Core
Вставка
- Опубліковано 7 чер 2024
- Using EF Core in Blazor Server has afew very important caveats and it's easy to get it wrong! In this video I'll show you how to use EF Core in Blazor Server the right way. But that's more to it! I'll show you how to do it by implementing full CRUD operationsin Blazor Server from scratch using, of course, EF Core.
Join this channel to get source code access and other perks:
/ @codewrinkles
Additional useful videos:
Why we need to use IDbContextFactory: • Using EF Core in Blazo...
Content
1.Intro: 00:00
2. Setting up models and DbContext: 00:40
3. Understanding IDbContextFactory: 01L49
4. Implementing ProductService: 03:03
5. EditProduct component: 05:52
6. AddProduct component: 12:11
7. ProductList component: 16:53
8. ProductDetails component: 23:23
9. Let's run the app! 26:05 - Наука та технологія
This is a terrific video, I love the style of just dropping in the code blocks and not watching you type everything.
Great video! I got a lot of insights from your explanation. Thanks!
Glad you found it useful
Excelent video. Thanks for sharing.
Thank you very much for awesome videos you always make.👍
So nice of you
I would probably use a confirmation overlay for the delete action, but excellent tutorial.👍
Thanks Mr.Dan for the awesome video.
Do you recommend a standalone components for Add and Edit instead of a single one for both of them?
As said in the video, I prefer to have them separated. I know they might have a lot of similarities, but in realities they have different reasons for change. You need to change something for the adding part and it might break the edit part. or the other way around. Practical experience showed me that it's more maintainable to have them separate.
Goes not only for Blazor components. But I'd do the same if I use Angular, React or other frameworks
Thxs for sharing! Quick question, what would be the main raison why the Add Producto does not show the overlay? Btw, Im using the Componets folder to add all pages.
Good video ! Care to make a video on how to add unit tests and integration tests for this CRUD operations?
From my point of view, there's nothing to unit test in CRUD operations. Integration tests might be indeed useful. I'd probably do that through the bUnit package. I don't promise anything about a video, but I'll have it in mind. Thanks for watching.
Nice demo. 👌
Thanks! 👍
is it advisable to create an interface for the services? such as IProductService?
Any plans for making videos on the new Blazor functionalities from .NET 8?
Be sure of that :)
using AddDbContextFactory How can I use db Transacctions as a unit of work?
is there a github repository link
for this project?