Article relates to
Telerik OpenAccess ORM
December 15, 2008
Last modified by
Now when we have the domain model classes it is time to enhance the project so that it could be handled by OpenAccess ORM. The OpenAccess Enable Project wizard will help us to do that:
You can do that also by right clicking on the project’s name inside the Solution Explorer, and in the context menu select OpenAccess -> Enable Project.
Then the OpenAccess wizard will show up:
Click ‘Next’ and move to the next step.
Make sure the ‘Persistent classes’ check box is checked. I recommend you to check the second check box as well. This will enable the creation of an ObjectScopeProvider helper class which provides a preset object context (IObjectScope instance) to the database we are going to use.
The third step is very important. Here you select the database server and define the connection settings. If a database with the desired name already exists it will be used, otherwise a new database will be created during the build process. Note that all these settings can be changed later in the ‘App.config’ file or by running the Enable Wizard again.
Now the project is prepared for using the OpenAccess ORM. Next step is to setup the classes we want to persist.
First make sure you have included the ‘using Telerik.OpenAccess;’ clause in the class definition file. To be marked as persistent the [Persistent] attribute should be put above each class definition.
Copyright © 2016, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.