Asp.net MVC-无法在我的视图中调用我的模型

Asp.net MVC-无法在我的视图中调用我的模型,asp.net,.net,asp.net-mvc,Asp.net,.net,Asp.net Mvc,我在模型文件夹中创建了一个模型,如下所示 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.Entity.Core.Objects; namespace EMWeb.Models { public class ReportIndexModel { public ObjectResult<GetTxSum

我在模型文件夹中创建了一个模型,如下所示

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity.Core.Objects;

namespace EMWeb.Models
{
    public class ReportIndexModel
    {
        public ObjectResult<GetTxSummary_Result> txSummaryResult { get; set; }
    }
}
使用系统;
使用System.Collections.Generic;
使用System.Linq;
使用System.Web;
使用System.Data.Entity.Core.Objects;
命名空间EMWeb.Models
{
公共类ReportIndexModel
{
public ObjectResult txSummaryResult{get;set;}
}
}
但在我看来,似乎是这样,,


我可以知道如何解决这个问题吗?

您需要添加模型参考,如

@model EMWeb.Models.ReportIndexModel

无需放入
只需删除它。

首先删除
在末尾。您可能需要类的完全限定名-
@model EMWeb.Models.ReportIndexModel
@StephenMuecke hi它是相同的,我可以在我的控制器上调用此模型,但视图您需要删除