Currently, there is no support for such feature in OpenAccess. A property cannot be mapped to a custom SQL query nor to a stored procedure directly.
Anyway, you should be able to create a property in a partial class, as you said, which utilizes a stored procedure directly. If you want to make only one call to the database, you can cache the value of the property using a nullable field. This will limit the "trips" to the database to only 1 in the first call. Please check the attached project where you can find an example. In this demo, a very simple stored procedure is called :
method is used to executes the stored procedure and obtain the first column of the first row of the query resultset.
In order to run the project don't forget to :
1. Generate the appropriate table in the database
* right click on the designer and select "Update database from model"
2. Create the stored procedure using the script above.
3. Edit the connection string located in the App.Config file to point to your local database.
I hope this will help you solve your problem. If you have any more questions, please do not hesitate to ask.
All the best,
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>