How to call stored procedure from nopcommerce API?

Posted: July 04, 2019 at 7:54 AM Quote #242160
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);
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: July 05, 2019 at 12:52 AM Quote #242173
can you please explain some more detail about your issue?
This post/answer is useful
2
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Pls up-vote the answer, if it helps you!

Thank's,
Sangeet Shah
====================================================
NopAdvance - nopCommerce Solution Partner
Website: https://nopadvance.com
Posted: July 05, 2019 at 2:00 AM Quote #242180
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..
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: July 05, 2019 at 4:32 AM Quote #242185
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)
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Pls up-vote the answer, if it helps you!

Thank's,
Sangeet Shah
====================================================
NopAdvance - nopCommerce Solution Partner
Website: https://nopadvance.com
Posted: July 05, 2019 at 4:54 AM Quote #242186
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
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: July 20, 2019 at 12:19 AM Quote #242700
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 post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Pls up-vote the answer, if it helps you!

Thank's,
Sangeet Shah
====================================================
NopAdvance - nopCommerce Solution Partner
Website: https://nopadvance.com
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.
eCommerce CONFERENCE 2019
Learn more