concept object model in category .net

appears as: object model, n object model, An object model, object model, The object model, object models
Entity Framework 4 in Action

This is an excerpt from Manning's book Entity Framework 4 in Action.

Figure 1.3. The Order2 table contains columns for the new data and is related to the Order table. In the object model, there’s no new class—just a new property on the Order class.

When you create these relationships, you’re beginning to create an object model. An object model is a set of classes related to each other that describe the data consumed by an application.

The real power of the object model emerges when you need to show orders and their related details in a single grid. In section 1.2.1, there was a fetching problem with a spectrum of solutions. Every one was different, but what’s worse is that every one required a different coding style on the interface.

When you instantiate the designer-generated context class, you don’t need to pass the connection string name to the constructor, whereas you have to pass it when working directly with ObjectContext. The designer knows what the connection string name is (you passed it in the designer wizard that created the object model and the context class, as you saw in chapter 2); and when the template generates the context-class code, it creates a constructor that invokes the base constructor, passing the connection string name. The context-class constructor is visible in the following snippet: