Select theme:
Radzen Blazor Studio has replaced Radzen as the primary RAD tool for Blazor applications.
Radzen Blazor Studio offers a modern UI, enhanced features, and improved performance to streamline your development process.
The latest documentation for Radzen Blazor Studio is available here: https://www.radzen.com/blazor-studio/documentation/
Open Radzen Blazor Studio docsThis guide demonstrates how to set stored procedure default parameter value.
1. Create new application with .NET server-side project and add new MSSQL data-source connected to Northwind database and check stored procedures.
Stored procedures execution can be customized using partial classes and methods.
2. Create CustOrderHistsController
partial class, provide default value for CustomerID
parameter and filter the result.
Set default value for parameters
public partial class CustOrderHistsController
{
partial void OnCustOrderHistsDefaultParams(ref string CustomerID)
{
CustomerID = "AROUT";
}
partial void OnCustOrderHistsInvoke(ref IQueryable<CustOrderHist> items)
{
items = items.Where(i => i.Total > 25);
}
}
Public Partial Class CustOrderHistsController
Private Partial Sub OnCustOrderHistsDefaultParams(ByRef CustomerID As String)
CustomerID = "AROUT"
End Sub
Private Partial Sub OnCustOrderHistsInvoke(ByRef items As IQueryable(Of CustOrderHist))
items = items.Where(Function(i) i.Total > 25)
End Sub
End Class
3. Invoke getCustOrderHists on button click without parameter and bind DataGrid to result.
4. Run the application
Radzen is free to use. You can also test the premium features for 15 days.
Start FreeSelect theme: