Which is good for large application in asp. Net mvc
Complex stored procedures etc
Which is good for large application in asp. Net mvc
Complex stored procedures etc
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.
Vishal YelvePosted Nov 18, 2022, 6:12 AM
There are some key differences between ADO.net and the entity framework as follows
The performance of ADO.Net is better than entity framework because ADO.Net is directly connected to the data source due to that it gives better performance than entity framework, whereas the performance of entity framework is less as compared to the ADO.Net as entity translate the LINQ queries to SQL first and then process the query.
The entity framework consisting of the wrapper classes for ADO.Net so with the help of it we can able to do coding faster, entity framework uses ADO.Net in the background.
In terms of raw SQL queries and procedures, ADO.Net provides more flexibility than the entity framework as ADO.net provides full control over the database. The LINQ queries are resulting in an efficient SQL query hence the raw SQL queries are useful, raw SQL queries are needful when we cannot want to express it by using LINQ, it returns a regular entity type which is the part of our model.
ADO.Net provides complete control over the data layer so that by using scratch developer can create classes and methods and that allows communicating between the application and the database, this process will take more time and more efforts to build the complete structure of the data access layer, whereas, the entity framework generates the models and database context classes automatically so it handles the operations which are performed on the database, this process of performing will take less time and the fewer efforts.
When we go from the application layer to the database layer to find what is happening in an application this process of debugging is so embarrassing, whereas, the entity framework provides modeled relationships very clearly and their tiers are dependent, the storage model and the mapping can change without changing data classes, conceptual model or application code and data classes.
The maintainable code is the code that is easy to modify or extend we can also say that it is such type of code that is easy to understand and troubleshoot at anomalous conditions within the application we logged in even if they do not have errors.
There are some features of ADO.net and the entity framework that are as follows, if we want to have more control over the database for operating SQL commands and operations by fetching queries then the working of ADO.net is great to work with it. The entity framework is a powerful framework that handles the database services that generate the mechanism of basic SQL queries, we can use these both in one project so that the entity framework performs the CRUD operation and the ADO.net performs the reporting and is used to operates the bulk of SQL data operations. Entity framework has three layers that object service layer which is the top layer of the entity framework, entity client layer is the core layer in the entity, and the data provider layer which is directly connected to the database, whereas, the ADO.net can access and modify the data which is stored in the data source like Oracle, MS SQL Server, MYSQL, and XML. It also has classes and data providers that are equivalent to the OLE DB, ODBC, JDBC drivers, etc. It uses two namespaces which are System.dll and System.xml and that support interaction between a client and the database.
Comparison Table
Rajeev KumarPosted Mar 2, 2023, 12:22 PM
According to me Entity Framework is good.But Stored procedures handle large quantities of data much better; in fact EF has some limitations on how much data can be handled.
Amit MohantyPosted Nov 18, 2022, 4:23 AM
If we want to achieve more control over SQL commands and operations with the help of raw SQL Queries, then ADO.NET will be a great choice to start work with. Whereas if we want to develop the application in a much faster way with clear code maintainability, then Entity Framework will be the better choice. But also, we can use both the approaches in a single application, like, Entity Framework for the CRUD-related operations and the ADO.NET for fetching records from the database for the reporting purpose and bulk data-related SQL operations.
Manickam PalanigounderPosted Nov 17, 2022, 10:43 PM
Entity FrameWork