You can look into it.
There are other ways to connect to database with Blazor in addition to Entity Framework Core?
I work with WebForms currently and all the access to SQL Server database is based on stored procedures to CRUD operations with SqlCommand and CommandType.StoredProcedure. I do not 'select' the database directly.
All I am reading about Blazor references Entity Framework which converts every item of the database into a component, but there are alternative methods for accessing to database?
Thanks in advance
2 answers
Sort by: Most helpful
-
-
Fei Han - MSFT 306 Reputation points Microsoft Vendor
2021-08-14T02:34:18.963+00:00 all the access to SQL Server database is based on stored procedures to CRUD operations with SqlCommand and CommandType.StoredProcedure.
Hi @jos3m , if you are familiar with using ADO.NET such SqlConnection, SqlCommand ect object to access SQL DB, you can achieve same by installing and using
Microsoft.Data.SqlClient
to access your existing SQL Server database in ASP.NET Core project.Besides, please note that Entity Framework Core also allows us to execute stored procedure(s) or raw SQL queries. For more information, you can check this doc: