日期:2014-05-20  浏览次数:20777 次

问个简单的linq查询问题
SELECT ID, Name,Sex,
  (SELECT COUNT(*)
  FROM table2 AS n
  WHERE (n.ID = m.ID)) AS count
FROM table1 AS m

类似这样的SQL查询语句,用Linq怎么写啊?

------解决方案--------------------
http://www.cnblogs.com/lovecherry/archive/2007/08/13/853754.html
------解决方案--------------------
探讨
SELECT ID, Name,Sex,
(SELECT COUNT(*)
FROM table2 AS n
WHERE (n.ID = m.ID)) AS count
FROM table1 AS m

类似这样的SQL查询语句,用Linq怎么写啊?