【发布时间】:2022-01-18 14:35:12
【问题描述】:
【问题讨论】:
-
不知道为什么显示
Controller,把它改成ControllerBase。 -
@KunalMukherjee 不,他想返回
View。ControllerBase用于 WebAPI 项目。 -
我使用的是 ControllerBase 而不是 Controller。然后出现了我不能再使用return View()的问题。它要求使用 ViewResult。
-
注意:我正在从空的 Web 应用程序构建一个 MVC 项目。当我从 MVC 创建它时,它没有任何问题。我认为有一个我不包括在内的依赖项。
标签: asp.net-core model-view-controller .net-6.0