• Pros and Cons of Load and Include

    You have some things to consider when choosing between the Load and Include methods. Although the Load method may require additional round trips to the server, the Include method may result in a large amount of data being streamed back to the client application and then processed as the data is materialized into objects. This would be especially problematic if you are doing all of this work to retrieve related data that may never even be used. As is true with many choices in programming, this is a balancing act that you need to work out based on your particular scenario. The documentation also warns that using query paths with Include could result in very complex queries at the data store because of the possible need to use numerous joins. The more complex the model, the more potential there is for trouble.

    You could certainly balance the pros and cons by combining the two methods. For example, you can load the customers and orders with Include and then pull in the order details on an as-needed basis with Load. The correct choice will most likely change on a case-by-case basis.

  • Debuging ObjectQuery

    When you write query with ObjectQuery, it use IQueryable interface. Following extension function help your to debug ObjectQuery more easily.

  • Seperate your EMD to 3 files

    When you generate your EMDX, you medata data is embedded in the output assembly as resource files. So you you connection string looks like "metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl" . But you have an option to save your metadata in loose file, so that your connection string will be something like "metadata=.\Model1.csdl|.\Model1.ssdl|.\Model1.msl"

  • Object Service (ObjectContext, ObjectQuery and EntityObject)

    The core objects of object service is ObjectContext and ObjectQuery and EntityObject. You can think of ObjectContext as entity repository. The repository is responsible to Insert/Update/Delete/Select entity.

  • Domain-Driven Development with EF v1

    Entity Framework version 1 is data-centric in the features it implements. Domain-driven development begins with the model, not the database. Many developers who embrace the tenets of domain-driven design will find the Entity Framework to be too restrictive. However, some of the advocates of this point of view are working with the Entity Framework team to enable version 2 to expand its capabilities so that you can use it with this approach.