日期:2014-05-20 浏览次数:21010 次
var query = from c in DataContextEntity where c.Names=="Home" and c.ParentID in ( from p in ParentTableName where p.Names=="Index") select c;
------解决方案--------------------
这叫 LAMDA表达式:
var cr = db.ControllersRoot.Where(ca => ca.Names == "Home" && ( from p in ParentTableName where p.Names=="Index").Contains(c.ParentID)).FirstOrDefault();