Data Access has been discontinued. Please refer to this page for more information.

CRUD Operations - Overview

The persistent class is the fundamental building block for describing the structure of data within the model. Instances of persistent 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 model. Queries can be composed using Language-Integrated Query (LINQ).

Before start writing queries against the 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 (FluentModel dbContext = new FluentModel())
Using dbContext As New FluentModel()
End Using

In this section