第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

通過(guò)具有分組的特定屬性從列表中刪除另一個(gè)列表中的項(xiàng)目

通過(guò)具有分組的特定屬性從列表中刪除另一個(gè)列表中的項(xiàng)目

C#
慕的地8271018 2022-10-23 15:41:04
我有兩個(gè)清單List A (CG300019159, CG300018158, FS300076458)List B Returns grouped lists like below     {            "pallet_identifier": "CG300018158",            "shipment_items": [                {                    "sku": "10366960",                    "stock_qty": 12,                    "description": "MOTHERCARE CREAM BABYGROW W/HAT"                },                {                    "sku": "10346788",                    "stock_qty": 1,                    "description": "KIT 7PC ESS CREW NECK CARDIGAN SKY BLUE"                }    ]    },    "pallet_identifier": "CG300018187",            "shipment_items": [                {                    "sku": "10366960",                    "stock_qty": 12,                    "description": "MOTHERCARE CREAM BABYGROW W/HAT"                },                {                    "sku": "10346788",                    "stock_qty": 1,                    "description": "KIT 7PC ESS CREW NECK CARDIGAN SKY BLUE"                }    ]    },我想使用屬性pallet_identifier 從列表B 中刪除托盤及其內(nèi)容。嘗試如下entity = new List<GoodInWarehouseBM>((from consighdrs in mi9db.consighdrs                        join consigdests in mi9db.consigdests on consighdrs.consignment equals consigdests                            .consignment                        join consigliness in mi9db.consiglines on consigdests.condestint equals consigliness                            .condestint                        join productcodess in mi9db.productcodes on consigliness.varint equals productcodess.varint                        join products in mi9db.products on productcodess.prodint equals products.prodint                        where consigdests.destination == storeId && consighdrs.status == "T" && consighdrs.warehouse == "900"                        group new { consigdests, productcodess, consigliness, products } by consigdests.consignment into grp                        select new GoodInWarehouseBM
查看完整描述

2 回答

?
子衿沉夜

TA貢獻(xiàn)1828條經(jīng)驗(yàn) 獲得超3個(gè)贊

你可以嘗試使用.Where(i=> getConsignmentbookedin.Any(z=> z != i.pallet_identifier))


entity = new List<GoodInWarehouseBM>((from consighdrs in mi9db.consighdrs

                        join consigdests in mi9db.consigdests on consighdrs.consignment equals consigdests

                            .consignment

                        join consigliness in mi9db.consiglines on consigdests.condestint equals consigliness

                            .condestint

                        join productcodess in mi9db.productcodes on consigliness.varint equals productcodess.varint

                        join products in mi9db.products on productcodess.prodint equals products.prodint

                        where consigdests.destination == storeId && consighdrs.status == "T" && consighdrs.warehouse == "900"

                        group new { consigdests, productcodess, consigliness, products } by consigdests.consignment into grp

                        select new GoodInWarehouseBM

                        {

                            pallet_identifier = grp.Key,

                            shipment_items = grp.Select(a => new GoodInWarehouseBM.ShipmentItems

                            {

                                sku = a.productcodess.variantcode,

                                stock_qty = a.consigliness.issueqty,

                                description = a.products.proddesc


                            }).ToList()


                        }).Where(i=> getConsignmentbookedin.Any(z=> z != i.pallet_identifier)).ToList();



查看完整回答
反對(duì) 回復(fù) 2022-10-23
?
慕慕森

TA貢獻(xiàn)1856條經(jīng)驗(yàn) 獲得超17個(gè)贊

您應(yīng)該在組和選擇之前應(yīng)用過(guò)濾器,因?yàn)槟鷣G棄了不需要的所有內(nèi)容,所以它會(huì)大大提高您的查詢。


entity = new List<GoodInWarehouseBM>((from consighdrs in mi9db.consighdrs.Where(i=> !getConsignmentbookedin.Contains(i.Id(id of item not sure which one it is))

                        join consigdests in mi9db.consigdests on consighdrs.consignment equals consigdests

                            .consignment

                        join consigliness in mi9db.consiglines on consigdests.condestint equals consigliness

                            .condestint

                        join productcodess in mi9db.productcodes on consigliness.varint equals productcodess.varint

                        join products in mi9db.products on productcodess.prodint equals products.prodint

                        where consigdests.destination == storeId && consighdrs.status == "T" && consighdrs.warehouse == "900"

                        group new { consigdests, productcodess, consigliness, products } by consigdests.consignment into grp

                        select new GoodInWarehouseBM

                        {

                            pallet_identifier = grp.Key,

                            shipment_items = grp.Select(a => new GoodInWarehouseBM.ShipmentItems

                            {

                                sku = a.productcodess.variantcode,

                                stock_qty = a.consigliness.issueqty,

                                description = a.products.proddesc


                            }).ToList()


                        })).ToList();


查看完整回答
反對(duì) 回復(fù) 2022-10-23
  • 2 回答
  • 0 關(guān)注
  • 114 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)