The ObjectScopeProvider and the ObjectContainerProvider are actually factories for getting instances of the IObjectScope and ObjectContainer containers respectively. These containers have been designed for slightly different purposes, although they implement the same interface IObjectContext.
ObjectScopeProvider’s purpose is to provide the means for obtaining a database context – an IObjetScope. The IObjectScope lets you access the persistent types mapped to the tables in your database. It thus provides the connection between the object-oriented model and the relational model. It offers tools for adding, updating and deleting persistent objects and exposes transaction management. This covers more or less the basic functionality of the scope.
You should note that we are currently putting our efforts in the OpenAccessContext which comes with the visual designer. In general, the OpenAccessContext and IObjectScope can accomplish the same things. Some of the advantages of the OpenAccessContext are simpler access to persistent objects and simpler logic for transaction management. In fact, transaction management is not something the user should worry about with the new context. Bear in mind that you cannot mix the OpenAccess classic wizards with the Visual Designer. You choose either of the two approaches and build your solution based on the chosen approach.
The ObjectContainer’s purpose is nicely introduced under the following section of our chm help that comes with the installation of Telerik OpenAccess: OpenAccess ORM Classic >Programming With OpenAccess >The OpenAccess ORM Disconnected API. The help section provides some simple examples to get you started. Also, you may find of particular interest the disconnected scenario blog posts:
Using the ObjectContainer in Disconnected Scenarios
Using the ObjectContainer in Disconnected Scenarios Part 2
In short, the ObjectContainer is used for disconnected web scenarios as all the objects in it along with the container can be serialized. The disconnected API doesn’t currently have an equivalent in the new Visual Designer.
In order to get the feel of the domain model usage workflow, I suggest you browse the Getting Started > Quickstart section and identify the scenario closest to your needs. There you will find the basics of the domain model handling.
Should you have any further questions, do not hesitate to contact us back.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items