The scope object you are seeing in the code snippets is legacy of old releases of Telerik Data Access. It is part of our Classic API
which will soon be entirely deprecated.
Currently the Context API
is used to perform CRUD operations
. The way to access the identity value of an object with backend calculated identity
is relatively unchanged. The identity property will return its actual value once the object has been inserted in the database
by adding it to the context and then calling the SaveChanges
method. The following code snippet is an example of accessing the identity of a newly inserted Car object:
Car car =
CarYear = 2012,
autoIncIdValue = car.CarID;
I hope this helps. Should you have additional questions, feel free to use our forums again.
OpenAccess ORM is now Telerik Data Access
. For more information on the new names, please, check out the Telerik Product Map