Fastest way to use Stored Procedure CRUD

I have few complex business logic in an application where I need to perform CRUD pages using Stored Procedures (all retrieve, Add, Edit and delete functionality)
What is the best recommended way to implement in radzen while reducing the custom code

Hi @ysaad,

You can review the following resources that show how to work with stored procedures in Radzen:

Basically you need to use the Invoke data source method action to execute the stored procedure and in its Then event a Set property action to store the ${result} of the method (stored procedure). Use that property as the Data of a DataGrid. Add and edit pages are similar - Handle the Submit event of the Form component and use Invoke data source method action to execute the stored procedure. Use the ${event.PropertyName} expressions to set the stored procedures parameters.

Probably the fastest way would be to use the CRUD page template available from the new page wizard and then update the generated events to invoke the required stored procedures.

@korchev I am already using stored procedures in list screens with no problem (similar to what you mentioned in your grid scoping example)

I am mainly asking on using SQL Stored procedure all the CRUD cycle
usp_Contact_Insert
usp_Contact_Select
usp_Contact_Update
usp_Contact_Delete

To use stored procedures for CRUD screens you need to:

  1. Handle the Submit event of the Form component.
  2. Add Invoke data source method action which uses the required stored procedure.
  3. Set the parameters of the stored procedure to ${event} properties e.g. the FirstName to ${event.FirstName}, LastName to ${event.LastName} etc.

Also here is a help article that shows how to create a CRUD pages manually in Radzen: