Although EF is a very popular staff, I'm not sure how I should use it. I encountered numerous ef problems while working on various projects with various methodologies. Consequently, I started to have some questions. I utilize pure ado.net with stored procedures as a result of the responses. So, here are the inquiries:
Should I just utilize one context for an atomic app-thread operation? One context per app thread may marginally improve performance and the ability to call navigation properties, however this solution also introduces the issue of updating the context when more data is loaded into it. I'm also unsure about concurrency with one dbcontext per app thread. We will need to remap ef outcomes to our DTOs as a result of using context for each operation. As a result, you can see that we returned to question number 1.
Could we try using solely EF + SPs? We are still having problems from earlier inquiries. Why use EF if the majority of its capabilities is not going to be used?
Thus, EF is a wonderful place to start a project. When we only have a few displays and basic operations, it is very convenient. Then, what?
The entire essay is basically a collection of random ideas. I am aware that using pure Ado.net will provide new difficulties. What do you think of this subject, then?
If you adhere to the naming conventions, you will learn that it is called: Entity Framework can't be faster because it is built on top of ADO.NET, although it may accomplish both tasks equally quickly. Instead, let's look at what EF offers:
Finally, EF and LINQ allow you a lot of flexibility for future application maintenance.
The Entity Framework has three different models: Model First, Database First, and Code First. Learn about each of them.
-The reason why remapping kills speed on the first run is because EF loads information into memory, which takes time as it creates an in-memory representation of the model from an edmx file.
ADO.NET provides consistent access to data sources such as SQL Server and XML, and to data sources exposed through OLE DB and ODBC. Data-sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, handle, and update the data that they contain.
Entity Framework 6 (EF6) is a tried and tested object-relational mapper (O/RM) for .NET with many years of feature development and stabilization. An ORM like EF has the following advantage
ORM lets developers focus on the business logic of the application thereby facilitating huge reduction in code.
It eliminates the need for repetitive SQL code and provides many benefits to development speed.
Prevents writing manual SQL queries; & many more..
Here is a thread on a relevant subject: What makes an ORM different from ADO.net?