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.
using (EntitiesModel dbContext = new EntitiesModel())
Using dbContext As New EntitiesModel()
In this section:
Defining Fetch Plans