Hi
I'm currently trying to add a recepy management system to nop_commerce 1.70.
I started by copying the news system but i'm having some problems..
Like the news system i have the following files:
/Nop.BusinessLogic/Content/Recepy
Recepy.cs
RecepyComment.cs
RecepyManager.cs
Just did a find and replace to replace news for Recepy.
In the database i copied the tables and necessary stored procedures:
Nop_Recepy
Nop_RecepyComment
Nop_RecepyLoadAll
Once again find and replace to replace news with recepy
After that i updated the Entity framework model in NopModel, added the function import to return the recepies "Sp_RecepyLoadAll" and added the following to NopObjectContext
public ObjectSet<Recepy> Recepies
{
get
{
if ((_recepies == null))
{
_recepies = CreateObjectSet<Recepy>();
}
return _recepies;
}
}
private ObjectSet<Recepy> _recepies;
public ObjectSet<RecepyComment> RecepyComments
{
get
{
if ((_recepyComments == null))
{
_recepyComments = CreateObjectSet<RecepyComment>();
}
return _recepyComments;
}
}
private ObjectSet<RecepyComment> _recepyComments;
public List<Recepy> Sp_RecepyLoadAll(int languageId, bool showHidden,
int pageSize, int pageIndex, out int totalRecords)
{
totalRecords = 0;
ObjectParameter languageIdParameter = new ObjectParameter("LanguageID", languageId);
ObjectParameter showHiddenParameter = new ObjectParameter("ShowHidden", showHidden);
ObjectParameter pageSizeParameter = new ObjectParameter("PageSize", pageSize);
ObjectParameter pageIndexParameter = new ObjectParameter("PageIndex", pageIndex);
ObjectParameter totalRecordsParameter = new ObjectParameter("TotalRecords", typeof(int));
var result = base.ExecuteFunction<Recepy>("Sp_RecepyLoadAll",
languageIdParameter, showHiddenParameter, pageSizeParameter,
pageIndexParameter, totalRecordsParameter).ToList();
totalRecords = Convert.ToInt32(totalRecordsParameter.Value);
return result;
}
Here's the problem, when i try to list all recepies using Recepy.aspx with a copy of the control News.ascx in the administration i get the following error on the NopObjectContext in this area of code:
var result = base.ExecuteFunction<Recepy>("Sp_RecepyLoadAll",
languageIdParameter, showHiddenParameter, pageSizeParameter,
pageIndexParameter, totalRecordsParameter).ToList();
totalRecords = Convert.ToInt32(totalRecordsParameter.Value);
return result;
The type parameter 'NopSolutions.NopCommerce.BusinessLogic.Content.RecepyManagement.Recepy' in ExecuteFunction is incompatible with the type 'NopSolutions.NopCommerce.BusinessLogic.Data.Recepy' returned by the function.
I've been bashing my head against the wall for hours with this one but i can't seem the find the problem, any ideas?Thans very much.