With Entity Framework, you can build some sophisticated applications elegantly. What’s the magic under the hood? Below is the Entity Framework Architecture

Data Provider
The lowest layer in the Entity Framework is data provider. It translates the common SQL languages such as LINQ via command tree to the native SQL expression, then execute it against the specific DBMS system. Currently only SQL Server Provider is available. The rumor said the Oracle provider is under development. In the future version, Microsoft will develop more data providers to support other data sources such as web services.
EntityClient Provider.
The EntityClient provider exposes the entity layer to the upper layer. It allows you to write code to query data base using Entity SQL, an entity ware language. The entity model is mapped to the database table via the mapping specification language (MSL ) and mapping engine.
The query pipeline of EntityClient provider compiles the entity sql text to the command tree, then pass it to the data provider.
EntityClient doesn’t materialize object from the data set. Some data intensive application such as Reporting application can leverage the performance benefit of EntityClient layer.
Object Services.
Object Service is ORM layer of Entity Framework. It materializes the data result to the object instances of entities. Object Service provides rich ORM features such as change tracking, lazy loading and primary key mapping. Both LINQ and Entity SQL could be used to write query.
Metadata Service
Metadata Service provides centralized API to access the metadata stored in the CSDL, MSL, SSDL and assembly files. Metadata such as entities, associations, entityset is essential for building highly flexible and powerful runtime applications and design-time tools.
Design Tools.
The Entity Framework provides many tools integrated with visual studio 2008 to improve productivity.
































