Blazor server crud tutorial
HTML-код
- Опубликовано: 7 сен 2024
- #blazor
Tutorial about blazor crud operations. We are using blazor server project in this tutorial.
Blazor is a framework by which you can create fullstack web SPA without using any javascript framework.
💻Source code: github.com/rd0...
Hit the 👍 if you are loving the series.
.................
Please share it to your circle to support me.
Other links:
▶Single video courses: • Asp.net core mvc (7.0 ...
▶Angular tutorials and projects: bit.ly/3DitqDp
▶dot net 6 tutorials and projects: bit.ly/3MSrXGX
▶dot net core series: bit.ly/3TolF4i
▶dot net 6 projects: bit.ly/3zpn9ng
.......................................................
connect with me
▶Twitter: / ravi_devrani
▶GitHub: github.com/rd003
▶RUclips: / @ravindradevrani
..........................................
Become a supporter❤:
You can buy me a coffee: www.buymeacoff...
use hot reload option
Outstanding....very simple way of delivering info, please make a video for how to design blazor application
A brilliant tutorial, Ravindra. Thank you. Can you build off this one and make more, please? I want to learn how to make a profile page, so people can add and save profile pictures and the difference between storing images in local, database and cloud and how to do it. I would be grateful!
May be in future.. the thing is I really don't use blazor. I more into .net + ja frameworks.
I have created few tutorials on blazor server / blazor wasm crud, authentication in blazor. I found it quite similar to razor pages.
If you are saving images, then save them in a local(if u are in development) and in server or cloud storage, and save their name in database (in production mode). Dont save them in database, they will increase the size of db.
@@ravindradevrani yeah, there is hardly any tutorials on how to do it properly and the code seems to have changed for saving in a cloud since you can't use the memory method. Thanks for the tutorials!
Don't worry you will figure out eventually.
Everything is much similiar in every type of .net core app.
Do you think blazor is used in production.
It's seems to me it's not there. Microsoft is trying to promote it, influencer are promoting it. But are they using it?
that was good, for beginners. please do a master detail, that would be really helpful.
Thank you for this tutorial. It is very helpful. I would rahter like to work with dapper to be able to connect to different databases and use stored procedures. But that would be one of the next steps anyway. Keep up the good work.
Yes dapper is good...sql gives more control.
I have made few tutorials with dapper.
You can check it, if you need.
@@ravindradevrani Thank you. I will certainly do that.
Amazing and clear.
Hello Sir, please make a project with Authentications & Authorizations.
I will try to make in future
@@ravindradevrani Thanks in advanced!
Please make employee management and API Projects
Merhaba hocam, benim export.razor ve export.razor.cs classim var.. export.razor.cs bir config classini miras alıyor yani ComponentBase'i değil. Export.razor içerisinde bu Config classi inherits ettim ama ne yazikki export.razor.cs den bir dynamic listi bu export.razor da kullanamıyorum. Ne yapmalıyım? Export.razor.cs Config i miras alıyor config ise ComponentBase i miras alıyor..
Great
Thanks
Can you add pagination and filter?
sorry... it's not possible for me to make changes in this project. But I will try to add one of these future in next blazor video, which I am planning to make in blazor wasm
I have an application with ef core that runs very well but as soon as i try to access one record the application crashes telling me that the table has no keys. According to SSMS both fields in that record are defined as keys. How can I change the class (definition of the entity) to get access to my table?
It seems to me that you have defined a key in database but not in model class for that table.
Are you using a primary key made with multiple columns eg (Name, Address)
or you are using single column (eg `Id`) as primary key.
I hope you are not making primary key directly in database and generating it through migration commands.
you can check this article:
learn.microsoft.com/en-us/ef/core/modeling/keys?tabs=fluent-api
@@ravindradevrani The table in the database was created via visual studio via migration and update-database, both fields in that table are defined as key fields. I can see that in SSMS. Meanwhile I found that I can use [key] before the first field in the class. But I can only declare one field as key field in C#, which is according to the table structure not correct.
m not sure, since i have not used two keys as a primary key ever. But it should have an option to create composite key.
@@ravindradevrani I am not sure if I understand what you mean. I am trying to access the system generated tables AspNetUserRole but my application crashes because it has no keys. This error message is wrong because the table has two fields and both of them are created as keay fields.
Aspnetuserrole is auto generated table, it should have a primary key Id. Since it is not generated by you so there should not be any problem.
I can't understand what's the issue here and why it has two keys.
Hello there I got this error:
Error Number:2,State:0,Class:20
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
Know how to solve?
seems like problem in connection string, provide correct server name, it should same as your sql server.. open sql management studio, at beginning it will prompt a dialog box, at top of it you can find the server name, use that server name in your connection string, "data source=your_server_name"
@@ravindradevrani thanks, I solved by simply modifying the conn string in json file like follows:
"data source=localhost;initial catalog=BlazorCRUD;integrated security=true;TrustServerCertificate=True"
Thank u!
👍
Tray to make more video on MAUI Blazor also
To be frank, right now,I dont have any knowledge of maui and I never made a mobile app in my life..thats one regret
I dont like to make any false promises.
May be in future I would like to try..
Maui and wpf related stuff.
But don't have any plans yet..
@@ravindradevrani Ok No Problem But Can you Put Video Blazor Server CRUD using WEB API ????
I have already made a video on blazor wasm..That is using web api..
Blazor server is not much different from blazor wasm,
You can use the same approach with blazor server.
Checkout that video in blazor playlist.
Or can we use Entity Freamwork Core in MAUI Blazor ??? becz. we can use it in Blazor Server
I dont have any idea..
But blazor webassembly cant use ef core,only blazor server can.
Check the microsoft docs..they should have mentioned
Ur doing way to much code in ur razor should be subclass that out
Agree..
GET TO THE POINT!!!!!!!!!!!!!!!!