2012-03-22 69 views

回答

43

Here is the answer you are looking for。使用Concat关键字。

从例如:

var query = (from x in db.Table1 select new {A = x.A, B = x.B}) 
    .Concat(from y in db.Table2 select new {A = y.A, B = y.B}); 
+0

@RamiSakr未知粘贴标识。 – 2012-03-26 02:23:56

3

我相信Concat是你正在寻找。

var allResults = resultSet1.Concat(resultSet2); 

显然,两个结果集必须使用相同的类型。我相信我还有其他关于结果集如何构建的要求,但我不知道所有细节。