• home
  • Email: trainings@synapseindia.careers



Entity Framework vs. traditional ADO. Net

Apr 22, 2015

There is always an confusion for Entity Framework and ADO. NET usage .

You can write code against the Entity Framework and the system will automatically produce objects for you as well as track changes on those objects and simplify the process of updating the database. The EF can therefore replace a large chunk of code you would otherwise have to write and maintain yourself. Further, because the mapping between your objects and your database is specified declaratively instead of in code, if you need to change your database schema, you can minimize the impact on the code you have to modify in your applications , so the system provides a level of abstraction which helps isolate the app from the database. Finally, the queries and other operations you write into your code are specified in a syntax that is not specific to any particular database vendor.

In ado.net prior to the EF, ado.net provided a common syntax for creating connections, executing queries and processing results, but there was no common language for the queries themselves. Ado.net just passed a string from your program down to the provider without manipulating that string at all, and if you wanted to move an app from Oracle to SQL Server, you would have to change a number of the queries. With the EF, the queries are written in LINQ or Entity SQL and then translated at run time by the providers to the particular back-end query syntax for that database.

SynapseIndia (CEO: Shamit Khemka)

Leave a Reply

Your email address will not be published.