How to call stored procedure from nopcommerce API?

5 months 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);
5 months ago
can you please explain some more detail about your issue?
5 months 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..
5 months 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)
5 months 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 months 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.