Model view controller 如何使用MVC5中的两个表计算特定项目类别id

Model view controller 如何使用MVC5中的两个表计算特定项目类别id,model-view-controller,Model View Controller,如何使用MVC5中的两个表计算特定项目类别id 这是密码 var Rq = db.ComputerRequestModel.Select(x => x.catagory_computerId==1).ToList(); var Desktop = db.Computers.Include(c => c.catagory_computer).Where(c => !Rq.Contains(c.catagory_computerId==1)).Count(); ViewBag.D

如何使用MVC5中的两个表计算特定项目类别id

这是密码

var Rq = db.ComputerRequestModel.Select(x => x.catagory_computerId==1).ToList();
var Desktop = db.Computers.Include(c => c.catagory_computer).Where(c => !Rq.Contains(c.catagory_computerId==1)).Count();
ViewBag.D = Desktop;