전체 오류 메시지 :모델 항목 유형 ...의이지만,이 사전은 ... 필요
@model MyClass<Interface1, Interface2>
:
내보기에
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]'.
, 내가 모델 선언이
MyClass에는 클래스이며, 인터페이스 1과 Interface2 내 컨트롤러 액션에 인터페이스
내가 부르고 있습니다 장소 :
012 32,: 모델 유형입니다 ...
MyClass<Implementation1,Implementation2>
... 그리고 Implementation1 어떤 방법이 있나요 인터페이스 1 및 Implementation2 구현 Interface2
를 구현 이 오류를 방지하려면 내 모델을 아래에 선언 할 필요없이? MyClass
는이 작업을 수행 할 수 없습니다 불변 때문에
@model MyClass<Implementation1, Implementation2>
당신이 모델을 사용 '할 수없는 이유라도 MyClass의 <인터페이스 1, Interface2> '? – DavidG