Can not use stored procedures with XPO.
From our experience majority of Enterprise project require Database access via Stored Procedures due to Company Security Policy.
Implementing access to Database via Stored Procedure will greatly increase appeal to Enterprise developers.
Proposed Solution:
Implement Stored Procedures as part of XPO or provide hooks for template generated (MyGeneration, CodeSmith) stored procedures.
Add support for stored procedures
Answers
Implementation Details:
Now, you have two ways to work with stored procedures:
- Directly execute stored procedures and handle returned data via the ExecuteSproc and GetObjectsFromSproc methods available in sessions and units of work.
- Map persistent classes on database views with the help of stored procedures and INSTEAD-OF triggers redirecting INSERT, UPDATE, and DELETE operations to stored procedures.
To help you out when working with stored procedures, the Persistent Classes wizard has been extended with options to generate:
- Helper classes to execute stored procedures and pass parameters.
- Persistent classes to map to database views.
- Data Description Language code for database views, INSTEAD-OF triggers, and stored procedures implementing INSERT, UPDATE and DELETE functionality.
Note: The Advantage, DB2, Firebird, MySql, and Pervasive databases have some known restrictions on generating result set columns, while the MSAccess database does not support getting the list of stored procedures. These issues may affect the Generating Persistent Classes wizard, which works just fine with other databases supported by XPO. Anyway, you can use the ExecuteSproc and GetObjectsFromSproc methods to call stored procedures for any database, except for the MSSqlServerCE and SQLite databases, which do not support stored procedures at all.
For more information, please refer to the following help topics:
DevExpress ORM Tool > Feature Center > Querying a Data Store > Stored Procedures
DevExpress ORM Tool > Feature Center > Querying a Data Store > Direct SQL Queries
Thanks,
DevExpress XPO Team
@Jacek: I have updated these links. Please refer to the official product documentation articles instead:
DevExpress ORM Tool > Feature Center > Querying a Data Store > Stored Procedures
DevExpress ORM Tool > Feature Center > Querying a Data Store > Direct SQL Queries