Entity Framework and Object Services Primer

As I am sure you have read by now, the Entity Framework is a huge leap forward in the next iteration of ADO.NET in Orcas.  Currently the implementation has a conceptual layer represented by a CSDL file. This CSDL file contains the XML that represents conceptual model (the objects). The conceptual layer is mapped to the database through a series of lower layers (the Mapping and the Source). The Source is represented by a SSDL file which contains XML that represents the database schema. The MSL file contains the XML that maps the CSDL to the SSDL. All 3 of these files can be generated using the EDM Model Wizard in the Orcas Feb/March CTP.

Once the model has been generated (or created by hand), the data can be manipulated and interrogated through the conceptual model. Thus a level of abstraction is created where an application can interact with data through an object model that is mapped to the underlying data source. LINQ to Entities or Entity SQL can be used to interact with the EDM. LINQ to Entities is great when you can define your query expressions at design time and enhance them with parameters. Entity SQL can also be sued to achieve the same goals, however since Entity SQL is string based it can support more dynamic queries where queries can be built on the fly.

There is quite a bit to chew with the Entity Framework, more than enough for a entire series of articles. And I have not even touched on the other ADO.NET components such as LINQ to SQL or LINQ to DataSets, much less the designers, LINQ to objects, LINQ to XML, EntityClient and much much more.

It is an exciting time to be involved with data access technologies! And some unforeseen changes are yet to come as many have already experienced the changes through the CTP’s of LINQ and Orcas. But it seems evident that the data access team is making its biggest change to data access in a very long time.