Can't find IDbContext method ExecuteStoredProcedureList

Posted: May 15, 2019 at 9:45 AM Quote #231888
Hi. I am trying to upgrade a plugin from nopcommerce 3.70 to 4.20 beta. In nopcommerce 4.20 beta IDbContext interface i can't find any method called "ExecuteStoredProcedureList". Can someone give me any suggestion  ? any alternative for "ExecuteStoredProcedureList" for nopcommerce 4.20 beta ?
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: May 15, 2019 at 11:55 AM Quote #231899
In nopcommerce 4.2 beta several stored procedures are installed.  I have included some of them below including where they are called from in the code.  I haven't gone as far as looking into how these methods are implemented to determine which is right/best but hopefully this should be enough to get to started.


Stored Procedure: dbo.LanguagePackImport

See LocalizationService.cs (line 440):

_dbContext.ExecuteSqlCommand("EXEC [LanguagePackImport] @LanguageId, @XmlPackage, @UpdateExistingResources",
    false, 600, pLanguageId, pXmlPackage, pUpdateExistingResources);



Stored Procedure: dbo.ProductLoadAllPaged

See ProductService.cs (line 697):

var products = _dbContext.EntityFromSql<Product>("ProductLoadAllPaged",
    pCategoryIds,
    pManufacturerId,
    pStoreId,
    ...



Stored Procedure: dbo.ProductTagCountLoadAll

See ProductTagService (line 92):

return _dbContext.QueryFromSql<ProductTagWithCount>("ProductTagCountLoadAll",
        pStoreId,
        pAllowedCustomerRoleIds)
    .ToDictionary(item => item.ProductTagId, item => item.ProductCount);



Hope this helps
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: May 22, 2019 at 3:22 AM Quote #232222
Thank You. It is working now.
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)
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