0
RazorPage를 상속하여 기본 페이지를 정의하려고합니다.ASP .Net 코어 - RazorPage에서 상속 <TModel> 문제
ArgumentException: Property 'ViewData' is of type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1[[MyProject.Models.IndexViewModel, MyProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]', but this method requires a value of type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.
매개 변수 이름 : viewContext
나는 내가 내 사용자 정의를 전달할 수 있습니다 을 ViewData을 무시할 수 있습니다 어떻게 페이지 내 @inherit 섹션에서의 tModel 이외 전달하면, 나는 다음과 같은 오류가 발생합니다 다음 줄에 대신 의 모델 IndexViewModel :
@inherits는
,536,913을 MyProject.Base.BaseView 그래서 나는이 작업을 수행 한개감사