0
SouravParia created
Hi, I just want to know what's the best way to call a parameterized store procedure from the Abp.io commercial application. If you guys share a code sample that'll be really helpful.
Thanks, Sourav
- ABP Framework version: v4.3.3
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
1 Answer(s)
-
0
Hi @SouravParia, we have a sample project named StoredProcedureDemo, maybe you can check AppUserRepository.cs in this sample project.
- In the sample project there is not any parameter passed to the stored procedure and you can update the related part like below.
using (var command = CreateCommand("<your_stored_procedure_name>", CommandType.StoredProcedure, new SqlParameter[] { /* your parameters: E.g. new SqlParameter("id", id) */ })) { //your logic... }