The whole Error Message:
The model item passed into the dictionary is of type
'MyClass`2[Implementation1,Implementation2]',
but this dictionary requires a model item of type
'MyClass`2[Interface1,Interface2]'.
In my View, I have the model declaration:
@model MyClass<Interface1, Interface2>
Where MyClass is a Class and Interface1 and Interface2 are interfaces
on my Controller Action I am calling:
return View(model);
where: model is of type...
MyClass<Implementation1,Implementation2>
...and Implementation1 implements Interface1 and Implementation2 implements Interface2
Is there any way to avoid this error, without having to declare my model as below?
@model MyClass<Implementation1, Implementation2>
MyClass<Interface1, Interface2>
? – DavidG