How to call stored procedure from nopcommerce API?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
I want to call stored procedure from nop API i have appiled same logic as I have done in my WEB controller..I t is totally working fine.my DB gets updated according to it..but from API it is not get reflected by any change

My code

var environment = _dataProvider.GetInt32Parameter("env", _nopConfig.EnvironmentValue);
                var OrderId = _dataProvider.GetInt32Parameter("OrdeId", orderDelta.Id);
                _dbContext.ExecuteSqlCommand("EXEC [GenerateInvoiceNo] @env, @OrdeId",
                   false, null,
                   environment,
                   OrderId);
4 years ago
can you please explain some more detail about your issue?
4 years ago
I just want to call stored procedure from my nopcommerce API project which i have using via plugins available for working with nopcommerce API.
To call stored procedure from web i have used above code and it worked perfactly but same code is not working in API..nor it is giving  any error..
4 years ago
above information is not complete to find the issue.

if your store procedure is not working then may be it through some error(check error log table)
4 years ago
issue resolved with rest request..I have created one method which update DB through stored procedure...then from my API i called that method using restrequest and it update my DB finely
4 years ago
Divya2901 wrote:
issue resolved with rest request..I have created one method which update DB through stored procedure...then from my API i called that method using restrequest and it update my DB finely



Great to share solution with us.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.