Hi,I 'm developing my oun Plugin,I need to extend the ProductModel,
I tried partial class style but I get an error indecating that ProductModel is placed in two diffrent DLLs !
So,I inhert ProductModel to use the new class in
my view instead of ProductModel,because I mainly need to nest the CheckModel class under ProductModel.
my Model code:
namespace Nop.Web.Models.Catalog
{
public class Keem_ProductModel : ProductModel
{
public Keem_ProductModel()
: base()
{
CheckModels = new List<CheckModel>();
}
public IList<CheckModel> CheckModels { get; set; }
public class CheckModel : BaseNopModel
{
public CheckAvailabilityModel()
{
//some code
}
}
in the view:
@model Nop.Web.Models.Catalog.Keem_ProductModel
I get this error:
The model item passed into the dictionary is of type 'Nop.Web.Models.Catalog.ProductModel', but this dictionary requires a model item of type 'Nop.Web.Models.Catalog.Keem_ProductModel'.
Any idea ho to extend the Model ,I only need to pass my newly created CkeckModel to a partialview that is in a view
that use the ProductModel.
Thanks