Hello
I want to build a Blazor application witheout Entity Framework .
Can someone point me into the right direction please .
Best regards
Rui Ruivo
Hello
I want to build a Blazor application witheout Entity Framework .
Can someone point me into the right direction please .
Best regards
Rui Ruivo
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Lokesh VarmanPosted Jul 2, 2023, 6:56 AM
If you want to build a Blazor application without using Entity Framework for data access, there are alternative options you can consider. Here are a few suggestions:
1.ADO.NET
2.Dapper
3.GraphQL
4.WebAPI
These are just a few options available to you when building a Blazor application without using Entity Framework. The choice depends on your specific requirements and preferences.
Imap BackupPosted Jul 5, 2023, 12:15 PM
Nice thanks
Sam HobbsPosted Jul 4, 2023, 12:15 AM
I suppose this question was meant to ask how to use a database without using Entity Framework. There are various libraries in .Net that can be used to use databases without EF.
EF and Dapper are both ORMs. It will take time to learn an ORM but they can save time after learning them. You can learn very much from using databases without an ORM but you will eventually learn the benefit of using an ORM.
Sam HobbsPosted Jul 2, 2023, 5:02 PM
A Blazor application that is created for us by .Net does not have Entity Framework. We usually add EF after the application has been generated. For you, just do not add EF. Simple.
Note that there are Blazor server applications and Blazor WebAssembly applications. Blazor WebAssembly applications create applictions that execute in the client (the browser). Blazor WebAssembly applications can be static and can be hosted in many hosts for free.
I use Cloudflare for my Blazor WebAssembly applications.
Tuhin PaulPosted Jul 2, 2023, 10:04 AM
1. Choose a method for interacting with your database. Some options include using a micro-ORM like Dapper or a data access library like ADO.NET.
2. Create classes that represent your data entities. These classes will map to the tables in your database.
3. Write methods in your data access layer to perform CRUD operations on your data models.
4. Blazor supports dependency injection, allowing you to register your data access classes as services.