The domain class is the fundamental building block for describing the structure of data within the domain model. Instances of domain classes (or objects) represent data in the data source. You can modify, create, and delete objects, and OpenAccess ORM tracks the changes made to these objects. When the SaveChanges method is called, OpenAccess ORM generates and executes commands that perform the equivalent insert, update, or delete statements against the data source.
Telerik OpenAccess ORM tools generate a class derived from OpenAccessContext that represents the data type container defined in the conceptual model. The OpenAccessContext class allows you to perform CRUD operations against the database. Telerik OpenAccess ORM supports object queries against a domain model. Queries can be composed using Language-Integrated Query (LINQ).
Before start writing queries against the domain model, you need to create a new instance of the OpenAccessContext. It is recommended to create a new instance of the context in using statement. Thus, you will make sure that the context is properly disposed.
| C# |
Copy Code |
|
using (EntitiesModel dbContext = new EntitiesModel()) { } |
| VB.NET |
Copy Code |
|
Using dbContext As New EntitiesModel() End Using |
In this section:
Concurrency Control
Defining Fetch Plans