Asp.net mvc 一次通过两个模型?

Asp.net mvc 一次通过两个模型?,asp.net-mvc,asp.net-mvc-4,model-view-controller,Asp.net Mvc,Asp.net Mvc 4,Model View Controller,在我当前的观点中,我正在传递这样一个模型: 控制器一 public ActionResult Index() { string UserId = User.Identity.GetUserId(); var Item = from a in db.MyDatabase where a.UserId.Equals(UserId) select a; return View(Item.FirstOrDefault()

在我当前的观点中,我正在传递这样一个模型:

控制器一

public ActionResult Index()
{
    string UserId = User.Identity.GetUserId();
    var Item = from a in db.MyDatabase
               where a.UserId.Equals(UserId)
               select a;
    return View(Item.FirstOrDefault());
}
视图一

@model Project.Models.Item
我还有另一个视图,它接收一些其他模型,特别是来自Asp.Net用户角色的模型

控制器二

public ActionResult Index()
{
    var RoleMan = new RoleManager<IdentityRole>(new RoleStore<IdentityRole>(new ApplicationDbContext()));
    var Roles = RoleMan.Roles;
    return View(Roles);
}
public ActionResult Index()
{
var RoleMan=new rolemager(new RoleStore(new ApplicationDbContext());
变量角色=RoleMan.Roles;
返回视图(角色);
}
视图二

@model IEnumerable<Microsoft.AspNet.Identity.EntityFramework.IdentityRole>
@model IEnumerable

在我新的(第三个)视图中,如何合并或发送这两个模型?因此,我可以在我的视图中同时使用它们?

创建第三个模型类,其中包含前两个模型类的实例


此外,这些表情符号的品味也很差,这是一个专业的问答网站,而不是卡考谈话论坛。

我猜所有四张反对票都来自荒谬和不必要的表情符号。这不是幼儿园。