我想合并两个列表。列表列表包含彼此不同的元素,我想将第一个列表合并到第二个列表:
var query = (
from articleA in db.V_Article
join articleC in db.V_CLIENT_PRIX on articleA.ARTICLE equals articleC.Article
where articleC.CLIENT == Current_Client_Id
select new
{
ID = articleA.ID,
ARTICLE = articleA.ARTICLE,
PRIXVHT = articleC.PrixVHT,
REMISE = articleC.Remise,
STOCK = articleA.STOCK,
FOURNISSEUR = articleA.FRN,
FAMILLE = articleA.FAMILLE,
UNITE = articleA.Unite,
IMAGE = articleA.Image,
QUANTITE = 0,
CIN = Current_Client_Id,
REFERENCE = articleA.REFERENCE,
TVA = articleA.TVA,
PRIXVTTC = tarifclient == 0 ? articleA.PrixVTTC : tarifclient == 1 ? articleA.T1_PrixTTC : tarifclient == 2 ? articleA.T2_PrixTTC : articleA.T3_PrixTTC,
});
list1 = query.ToList() ;
这是第二个清单:
var article = (
from articleA in db.V_Article
where !tabEnc.Contains(articleA.ID)
select new
{
ID = articleA.ID,
ARTICLE = articleA.ARTICLE,
PRIXVHT = articleA.PrixVHT,
REMISE = 0,
STOCK = articleA.STOCK,
FOURNISSEUR = articleA.FRN,
FAMILLE = articleA.FAMILLE,
UNITE = articleA.Unite,
IMAGE = articleA.Image,
QUANTITE = 0,
CIN = Current_Client_Id,
REFERENCE = articleA.REFERENCE,
TVA = articleA.TVA,
PRIXVTTC = tarifclient == 0 ? articleA.PrixVTTC : tarifclient == 1 ? articleA.T1_PrixTTC : tarifclient == 2 ? articleA.T2_PrixTTC : articleA.T3_PrixTTC,
}).ToList;
我想合并(连接)这两个列表 - 我该怎么做?