Can't find IDbContext method ExecuteStoredProcedureList

1 year ago
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 ?
1 year ago
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",

Stored Procedure: dbo.ProductTagCountLoadAll

See ProductTagService (line 92):

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

Hope this helps
1 year ago
Thank You. It is working now.