CRUD Operations - Overview

This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.

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 Telerik Data Access tracks the changes made to these objects. When the SaveChanges method is called, Telerik Data Access generates and executes commands that perform the equivalent insert, update, or delete statements against the data source.

Telerik Data Access 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 Data Access 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()
End Using

In this section: