控制器索引按用户ID列出搜索名称

时间:2019-04-17 16:32:28

标签: c# asp.net-mvc entity-framework

select t1.grp_id,t1.mid ,(select t2.grp_id from Tab2 t2 where 
t1.grp_id=t2.grp_id and t1.mid=t2.mid ),
(select t2.mid from Tab2  t2 where t1.mid=t2.mid and t1.grp_id=t2.grp_id)
from tab1 t1 where t1.grp_id=1
;

我有一个具有4个属性的modelView,我想通过IDon在ASP.NET MVC索引页面上显示public ActionResult Index() { var model = _context.TBL_UserFunctionScope .Select(p => new FunctionScopeViewModel() { FunctionScopeID = p.FunctionScopeID, ParentScopeName = _context.TBL_UserFunctionScope.Find(p.ParentScopeID).Name, NameFunctionScope = p.Name, NameFunction = p.TBL_UserFunction.Name }).ToList(); return View(model); } 的信息。

但是我在网上遇到错误

ParentScopeName

0 个答案:

没有答案