Adding New Stored Proc

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi,

I need to change the logic of the ProductLoadAllPaged to meet my need. So I added a new stored proc called ProductLoadAllPaged. Changed the ProductManager, but I get an exception when I run the process.

Anyone any ide what I am missing...

The FunctionImport 'Sp_ProductLoadAllPagedFF' could not be found in the container 'NopEntities'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The FunctionImport 'Sp_ProductLoadAllPagedFF' could not be found in the container 'NopEntities'.

Source Error:


Line 2909:            ObjectParameter totalRecordsParameter = new ObjectParameter("TotalRecords", typeof(int));
Line 2910:
Line 2911:            var result = base.ExecuteFunction<Product>("Sp_ProductLoadAllPagedFF",
Line 2912:                categoryIdParameter, manufacturerIdParameter, productTagIdParameter,
Line 2913:                featuredProductsParameter, priceMinParameter, priceMaxParameter,
13 years ago
Did you try updating NopEntities?
13 years ago
How should I do that? Please advise.

I tried updating the nop edmx via xml editor. but that also did not worked.
13 years ago
Anybody out there know how to modify NopEntities....
13 years ago
I think the following tutorial could help you http://msdn.microsoft.com/en-us/library/bb896279.aspx and http://msdn.microsoft.com/en-us/library/bb896231.aspx
P.S. The only difference is that you have to manually add appropriate code to NopObjectContext.cs. BTW, auto-generation of NopObjectContext will added in upcoming 1.90 release
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.