我有2個獨立的集合。如何將兩個單獨的IQueryable <string>集合合併爲一個?
IQueryable<string> customers;
IQueryable<string> customersPhone
目前,這是我使用加入一個與其他
IEnumerable<string> union = customers.Union(customersPhone);
的問題是,當我有多個類似的客戶收集記錄,工會只是一個導致代碼單個記錄將被返回。我需要全部返回,而不管是否有重複項,並將它們與customersPhone集合一起加入。
這可能嗎?那有意義嗎?
謝謝! Kevin
聯盟是一組操作;根據定義設置排除重複項。正如SLaks所說,你應該使用'Concat()'。 – phoog 2012-03-01 18:36:01