- Entity Framework Tutorial(Second Edition)
- Joydip Kanjilal
- 489字
- 2021-07-16 20:41:52
What is the ADO.NET Entity Framework?
Entity Framework is a type of ORM. It is a development platform that provides a layer of abstraction on top of the relational or logical model. In doing so, it isolates the object model of the application from the way the data is actually stored in the relational store. Developers can use the ADO.NET Entity Framework to program against an object model rather than the logical or relationship model.
This is illustrated using the self-explanatory diagram that follows:

This level of abstraction is achieved using the Entity Data Model (EDM)—an extended entity relationship model. The EDM reduces the dependency of your domain object model on the database schema of the data store in use. We will discuss more on this topic later in this chapter.
Developers can use the ADO.NET Entity Framework to work with domain-specific properties such as employee name, employee address, contact details, and so on, without having to be concerned with how the actual data is stored and represented in the underlying data store. The framework can take care of the necessary translations to either retrieve data from your data store or perform inserts, updates, and deletes. Also, Entity Framework provides support to cache data automatically by default.
Is Entity Framework just another ORM?
The ADO.NET Entity Framework is an extended ORM technology from Microsoft. We say it is an extended ORM because it has many additional features compared to a typical ORM. ORMs often use metadata and factory classes to retrieve data or collections of data.
On the contrary, using Entity Framework, you can easily map your data to be accessible in a relational representation in the database to objects, no matter how the mapping is implemented. You can expose different data views to your application without having to change your relational schema. In essence, this allows the applications to have their own view of the data. The applications can even reuse the same views of data among themselves.
The major difference between Entity Framework and ORM tools is the EDM and the former's ability to query data using strongly typed LINQ. You can even use Entity SQL, a T-SQL-like query language to query the EDM, to execute dynamic queries. In addition to what a typical ORM framework provides, the Entity Framework provides and supports entity inheritance, entity composition, and a flexible, loosely-coupled, three-tiered model consisting of the conceptual model, the mapping layer, and the storage model. Please refer to the Appendix section for links to resources on this topic.
Entity Framework even enables you to extend the existing schema. In other words, you can extend the generated entity classes to create your own custom entity classes. You can define relationships of any kind such as one-to-one, one-to-many, and even many-to-many.
- CentOS 7 Server Deployment Cookbook
- Python自動(dòng)化運(yùn)維快速入門(第2版)
- Bootstrap Essentials
- 利用Python進(jìn)行數(shù)據(jù)分析(原書第3版)
- Python Web數(shù)據(jù)分析可視化:基于Django框架的開發(fā)實(shí)戰(zhàn)
- Python算法詳解
- Test-Driven Machine Learning
- C專家編程
- 編程改變生活:用Python提升你的能力(進(jìn)階篇·微課視頻版)
- Web程序設(shè)計(jì):ASP.NET(第2版)
- Java核心技術(shù)速學(xué)版(第3版)
- 熱處理常見缺陷分析與解決方案
- 編程真好玩:從零開始學(xué)網(wǎng)頁設(shè)計(jì)及3D編程
- WordPress 3.7 Complete(Third Edition)
- Python架構(gòu)模式:精通基于Python的API設(shè)計(jì)、事件驅(qū)動(dòng)架構(gòu)和包管理