Open Closed

What's the process to call a Store Procedure #2530


User avatar
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)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi @SouravParia, we have a sample project named StoredProcedureDemo, maybe you can check AppUserRepository.cs in this sample project.

    using (var command = CreateCommand("<your_stored_procedure_name>", CommandType.StoredProcedure, new SqlParameter[] { /* your parameters: E.g. new SqlParameter("id", id) */ }))
    {
        //your logic...
    }
    
Made with ❤️ on ABP v9.1.0-preview. Updated on December 12, 2024, 07:15