我们来看看EF的框架设计吧:

The following figure shows the overall architecture of the Entity Framework. Let us now look at the components of the architecture individually:

EDM (Entity Data Model): EDM consists of three main parts - Conceptual model, Mapping and Storage model.

Conceptual Model: The conceptual model contains the model classes and their relationships. This will be independent from your database table design.

Storage Model: Storage model is the database design model which includes tables, views, stored procedures, and their relationships and keys.

Mapping: Mapping consists of information about how the conceptual model is mapped to the storage model.

LINQ to Entities: LINQ to Entities is a query language used to write queries against the object model. It returns entities, which are defined in the conceptual model. You can use your LINQ skills here.

Entity SQL: Entity SQL is another query language just like LINQ to Entities. However, it is a little more difficult than L2E and the developer will have to learn it separately.

Object Service:Object service is a main entry point for accessing data from the database and to return it back. Object service is responsible for materialization, which is the process of converting data returned from an entity client data provider (next layer) to an entity object structure.

Entity Client Data Provider:The main responsibility of this layer is to convert L2E or Entity SQL queries into a SQL query which is understood by the underlying database. It communicates with the ADO.Net data provider which in turn sends or retrieves data from the database.

ADO.Net Data Provider:This layer communicates with the database using standard ADO.Net.

EDM(Entity Data Model)【实体数据模型】:实体数据模型包含三个主要部分:概念模型,映射,存储模型;

Conceptual Model【概念模型】:包含模型类和类之间的关系。概念模型是独立于数据库设计的;

Storage Model【存储模型】:存储模型是数据库设计的实体,它包含数据表,视图,存储过程,还有他们之间的关系和键值;

Mapping【映射】:映射包含这个概念模型怎么映射到存储模型的信息;

LINQ to Entities:LINQ to Entities是查询语言,用来查询对象模型。它返回的是定义在概念模型中的实体;

Entity SQL:Entity SQL是另外的查询语言,就像LINQ to Entities一样,然而它和LINQ to Entities有一点不同,我们需要单独去学一下;

Object Service:Object Service是一个主要的切入点去从数据库中获取数据,并返回数据。Object Service负责将数据返回给Entity Client Data Provider实体对象结构;

Entity Client Data Provider:它主要的职责是将L2E(LINQ to Entity)或者Entity SQL查询语言,拼接成底层数据库可以理解的语言。它负责和ADO.NET Data Provider通信;

ADO.NET Data Provider:这个层,主要是用标准的ADO.NET和数据库打交道。

好了,EF的框架,差不多学到这里,相信大家已经有了一个基本的理解了。

EF框架组件详述【Entity Framework Architecture】(EF基础系列篇3)的更多相关文章

  1. Entity Framework 5.0基础系列

    1.Entity Framework简介 http://www.cnblogs.com/aehyok/p/3315991.html 2.Entity Framework DBFirst尝试http:/ ...

  2. EF(Entity Framework)系统学习系列

    好久没写博客了,继续开启霸屏模式,好了,废话不多说,这次准备重新系统学一下EF,一个偶然的机会找到了一个学习EF的网站(http://www.entityframeworktutorial.net/) ...

  3. Entity FrameWork(实体框架)是以ADO.NET Entity FrameWork ,简称为EF

    Entity FrameWork(实体框架)是以ADO.NET Entity FrameWork ,简称为EF Entity FrameWork的特点 1.支持多种数据库(MSSQL.Oracle.M ...

  4. 基于.NET的微软ORM框架视频教程(Entity Framework技术)

    基于.NET的微软ORM框架视频教程(Entity Framework技术) 第一讲  ORM映射 第二讲 初识EntifyFramework框架 第三讲 LINQ表达式查询 第四讲 LINQ方法查询 ...

  5. Entity Framework Tutorial Basics(3):Entity Framework Architecture

    Entity Framework Architecture The following figure shows the overall architecture of the Entity Fram ...

  6. Entity Framework 6.0 入门系列 第一篇

    Entity Framework 6.0 入门系列 第一篇 好几年前接触过一些ef感觉不是很好用,废弃.但是 Entity Framework 6.0是经过几个版本优化过的产物,性能和功能不断完善,开 ...

  7. Entity Framework Code First学习系列目录

    Entity Framework Code First学习系列说明:开发环境为Visual Studio 2010 + Entity Framework 5.0+MS SQL Server 2012, ...

  8. Entity Framework Code First学习系列

    Entity Framework Code First学习系列目录 Entity Framework Code First学习系列说明:开发环境为Visual Studio 2010 + Entity ...

  9. Entity Framework 6.1 学习系列1--概况、安装

    原文:Entity Framework 6.1 学习系列1--概况.安装 Entity Framework:实体框架,看名字就知道是针对模型数据的.这是MS推出的一款ORM工具. 与NHibernat ...

随机推荐

  1. ExtJS扩展:扩展grid

    ExtJs的grid功能很强大,但是有时候觉得总是少那么一点点功能,我们就来扩展它,让它用起来更方便. 今天我们要扩展的是:根据记录的选择数量来禁用或启用grid toolbar上的某些按钮. 本文所 ...

  2. TDDL分库分表规则

    规则如下: 判断一个ID在哪个库里的公式是:id % 4 / 2判断一个ID在哪个表里的公式是:id % 4 % 2 其中4表示总共有多少个分表,2表示总共有多少个数据库:上面这个例子,表示总共有2个 ...

  3. 剑指Offer面试题:17.树的子结构

    一.题目:树的子结构 题目:输入两棵二叉树A和B,判断B是不是A的子结构.例如下图中的两棵二叉树,由于A中有一部分子树的结构和B是一样的,因此B是A的子结构. 该二叉树的节点定义如下,这里使用C#语言 ...

  4. LOMA280保险原理读书笔记

    LOMA是国际金融保险管理学院(Life Office Management Association)的英文简称.国际金融保险管理学院是一个保险和金融服务机构的国际组织,它的创建目的是为了促进信息交流 ...

  5. js模版引擎handlebars.js实用教程——目录

    写在开头的话: 阅读本文需要了解基本的Handlebars.js概念,本文并不是Handlebars.js基础教程,而是注重于实际应用,为读者阐述使用过程中可能会遇到的一些问题. 实际上,小菜写这篇文 ...

  6. InstallShield2013 error 6109

    InstallShield在没添加打包文件时是可以编译生成安装包的,在增加打包文件之后就报以下错误: ISEXP : error : -6109: Internal build error ISEXP ...

  7. SSIS的 Data Flow 和 Control Flow

    Control Flow 和 Data Flow,是SSIS Design中主要用到的两个Tab,理解这两个Tab的作用,对设计更高效的package十分重要. 一,Control Flow 在Con ...

  8. Android仿微信二维码扫描

    转载:http://blog.csdn.net/xiaanming/article/details/10163203 了解二维码这个东西还是从微信中,当时微信推出二维码扫描功能,自己感觉挺新颖的,从一 ...

  9. ASP.NET Core中的依赖注入(5): ServiceProvider实现揭秘 【解读ServiceCallSite 】

    通过上一篇的介绍我们应该对实现在ServiceProvider的总体设计有了一个大致的了解,但是我们刻意回避一个重要的话题,即服务实例最终究竟是采用何种方式提供出来的.ServiceProvider最 ...

  10. EntityFramework之数据库以及表基本创建(一)

    前言 之前有学过EF一段时间那时EF才4.0似乎还不太稳定,而现在EF都已7.0版本,同时AspNet Identity都与此大有关联,看来是大势所趋于是开始学习EF,在学EF过程中也遇到一些小问题, ...