Тёмный

Display Live Data From Database in Blazor (SqlTableDependency & SignalR) 

ZetBit
Подписаться 2,7 тыс.
Просмотров 19 тыс.
50% 1

Learn how to display live data from the database in Blazor using SqlTableDependency & SignalR.
Download project: zetbit.tech/Downloads/Project...
Article with code: zetbit.tech/categories/asp-do...
Blog: zetbit.tech
-- Official ZetBit Clothes Collection: www.etsy.com/dk-en/shop/ZetBit 👕
---------------------------------------------------------------------------------------------
🎮 My Top Gaming Gear 🎮
🖱️ Gaming Mouse: ebay.us/XiNpuq
🖱️ Ergonomic Mouse: ebay.us/WCEiHi
🔳 Gaming Mousepad: ebay.us/kz8FsX
🎮 Gaming Set: ebay.us/z3BHGR
🖥️ High-Res Monitor: ebay.us/gD2SJM
💻 My Top Software 💻
🎨 Adobe Creative Cloud: tinyurl.com/2e2chrd5

Наука

Опубликовано:

 

20 фев 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 42   
@JosyRaza
@JosyRaza 4 месяца назад
Important note, I was trying to use this approach in a Blazor project using Net 8.0 and it failed due to some dependencies reported on the SqlTableDependency Git which are not yet resolved, same with .Net 7.0, so the trick was to use the same versions you used here and it worked like a charm. Thanks a lot
@mariellandayaka5449
@mariellandayaka5449 10 месяцев назад
I actually used to be a bit afraid of using SignalR in most of my DEV work especially when rendering millions of records. But now I'm excited to say that a proper setup of SignalR with hubs with Razor methods may give good result after all 👍. very happy dudde!
@Tamer_Ali
@Tamer_Ali Год назад
Thanks ZetBit for the awesome video 👍
@zetbit
@zetbit Год назад
Always happy to help 😁
@CRBarchager
@CRBarchager Год назад
Very nice explaination. I can already see multible usages for this package.
@zetbit
@zetbit Год назад
Thanks for the kind words! Yes there is many possibilities with this 👌
@jennasyeda6613
@jennasyeda6613 10 месяцев назад
👍very nice way, Looking forward for ur more database related video,
@zetbit
@zetbit 10 месяцев назад
Thanks!
@qlmdev
@qlmdev Год назад
Fantastic! Thanks.
@zetbit
@zetbit Год назад
You are welcome!
@mykursnet
@mykursnet 7 месяцев назад
great . .. thank you
@zetbit
@zetbit Год назад
Support by hitting 2 buttons! Like and Subscribe 👏
@JtendraShahani
@JtendraShahani 8 месяцев назад
I am now to .NET & Blazor. How can we handle adding new records. I tried it but I get an exception related to trigger.
@raymondjolly282
@raymondjolly282 Год назад
Thank you for this tutorial. Quick question. It appears that ResponseCompression is now deprecated. What should we use as an alternative?
@zetbit
@zetbit Год назад
I actually dont know, however I will try to investigate, maybe it could lead to some more simple code 👌
@jndsdk
@jndsdk Год назад
❤❤❤❤
@zetbit
@zetbit Год назад
❤️❤️❤️❤️
@coolwaterdvr
@coolwaterdvr Год назад
👍👍👍👍👍
@zetbit
@zetbit Год назад
👌👌👌👌👌
@kendraper8156
@kendraper8156 Год назад
Great example. The only thing missing in the demo is showing a message log😀 when there is an Insert,Update or Delete to an employee record. The method Changed receives args.ChangeType with enum None,Delete,Insert Or Delete.
@zetbit
@zetbit Год назад
That is true, could have been awesome to include actually 😁
@cissemy
@cissemy 5 месяцев назад
Great job. Let's say i have a fleet of drivers with Id,latitude and longitude . How to update their positions on the map using sqlTableDependency and signalr ?
@yomero4427
@yomero4427 21 день назад
If their are updating their positions in the database, you coud use this example to show their positions in a map. its reflecting changes in database. its awesome.
@Zaeed1
@Zaeed1 Год назад
Does the version of the entityframeworks have to be the 6.x versions?
@zetbit
@zetbit Год назад
No I don't think that EF has to be 6.x version. I think you can use whatever version you want, because it is all really up to SqlTableDependency and SignalR to do the job. 👌 EF only have to get the new data when told to by SqlTableDependency, so it should be no problem.
@MohiyoDeen
@MohiyoDeen Год назад
It would nice of you if you add a Authentication in Blazor/SignalR
@zetbit
@zetbit Год назад
That is a good idea, will write that on my todo list!
@hermanreyes2400
@hermanreyes2400 Год назад
Can this be also used in MySql? Also, what if I have many tables in the database, thus this means I have to create a hub for each one of them? Thanks in advance.
@zetbit
@zetbit Год назад
I don't know a solution for MySQL. This would not work with MySQL because you dont have the specific setting "Service Broker" in MySQL. And you could use different hubs for a good structure, but you could also just use 1 hub and then call different methods in that one hub 😁
@hermanreyes2400
@hermanreyes2400 Год назад
@@zetbit Thank you very much for the response.
@yomero4427
@yomero4427 21 день назад
You can use generics
@UmmarFarooqMahroof
@UmmarFarooqMahroof Месяц назад
is it possible without EF?
@yomero4427
@yomero4427 21 день назад
Yes!, its reflecting changes in database. in the method GetAllEmployees() you could use dapper, or ADO or whatever you are using
@hellowong0157
@hellowong0157 5 месяцев назад
Can't search the blazor server app
@zetbit
@zetbit 5 месяцев назад
Do you use .NET 8? I think blazor server app is only in the versions earlier than .NET 8
@user-xn5us4rh4b
@user-xn5us4rh4b Год назад
Very nice video, unfortunately, blazor server is very inestable and this project does not work in blazor Wasm. It's impossible to resolve "Unable to resolve service for type 'Microsoft.AspNetCore.SignalR.IHubContext`1[REaltimeWASM.Shared.Models.EmployeeHub]' while attempting to activate 'REaltimeWASM.Shared.Models.EmployeeService'."
@zetbit
@zetbit Год назад
Sure, it will not work with WASM 👌
@dublux9878
@dublux9878 Год назад
What if employer has one to many relationship with another table? Can I monitor more than one table at once?
@zetbit
@zetbit Год назад
That could be a good idea for maybe a part 2 for this video. I have not tried it out myself yet 💪
@dublux9878
@dublux9878 Год назад
@@zetbit My Relational db is quite complicated. Do you know other way (without signalR) to build real-time app on Blazor server?
@zetbit
@zetbit Год назад
@@dublux9878 I dont know a way without SignalR, however there should be a way. I once saw some article-headlines where it said "live data without SignalR". However even though you have a complicated relational database, this solution should still work, because all it requires is just a fresh set of data. So just fetching a new set of data from the database should be fine 😁
Далее
Create a Blog with Blazor | Part 1 - Posts
51:01
Просмотров 4,7 тыс.
Ютуб был хороший...
00:52
Просмотров 210 тыс.
would you eat this? #shorts
00:23
Просмотров 1,5 млн
Blazor Full Course For Beginners
5:06:17
Просмотров 74 тыс.
Battery  low 🔋 🪫
0:10
Просмотров 13 млн