var resolveExpress =
db.ResolveExpress.Where(c => c.ResolveType != 0)
.Join(db.ResolveType,
resolveExpresss => resolveExpresss,
resolveType => resolveType.ResolveType1,
(resolveExpresss, resolveType) =>
new { id= resolveExpresss.ResolveID,title= resolveType.ResolveTitle });
2个表 resolveExpress 和ResolveType
db.ResolveExpress.Where(c => c.ResolveType != 0) 取出第一张表 然后做链接 另个一表ResolveType
连接条件安ResolveExpress.ResolveType=ResolveType.resolveType1
怎么 用db.ResolveExpress.Where(c => c.ResolveType != 0) .Join(后边参数怎么写
我这样写为什么是错的 提示:无法推倒出方法的类型实参,请尝试显示指定
var resolveExpress = db.ResolveExpress.Where(c => c.ResolveType != 0)
.Join(db.ResolveType,
resolveExpresss => resolveExpresss,
resolveType => resolveType.ResolveType1,
(resolveExpresss, resolveType) =>
new { id= resolveExpresss.ResolveID,title= resolveType.ResolveTitle });
------解决思路----------------------
.Join<..., ...>(...) 这里需要显式指定类型参数