我在 Return View(viewModel) 上收到一个错误,上面写着“'View' 是一种类型,不能用作表达式。” 我怎样才能解决这个问题?
Function ShowFeed() As ActionResult
Dim feedUrl = "somefeedurl"
Dim feed As SyndicationFeed = GetFeed(feedUrl)
' build a view model
Dim viewModel = New RssModel()
viewModel.Title = feed.Title.ToString
viewModel.Description = feed.Description.ToString
viewModel.Link = feed.Links.ToString
Return View(viewModel)
End Function