cq-panda / Vue.NetCore

(已支持sqlsugar).NetCore、.Net6、Vue2、Vue3、Vite、TypeScript、Element plus+uniapp前后端分离,全自动生成代码;支持移动端(ios/android/h5/微信小程序。http://www.volcore.xyz/
MIT License
3.82k stars 1.27k forks source link

请教DeleteWithKeys的第一个参数要给什么?? #276

Open Jay413191 opened 2 years ago

Jay413191 commented 2 years ago

如下,DeleteWithKeys的第一个参数要如何写??

List invHis = _inventoryHistoryRepository.FindAsIQueryable(x => x.ApplyNo == inv.ApplyNo ).ToList(); inventoryHistoryRepository.DeleteWithKeys(invHis[0].InventoryHistoryKey, true);

cq-panda commented 2 years ago

传object[]数组,比如new object[]{1,2,3,4,5}

Jay413191 commented 2 years ago

可以了, 感谢大大!!

List invHis = _inventoryHistoryRepository.FindAsIQueryable(x => x.ApplyNo == inv.ApplyNo && x.SNo == inv.SNo).ToList(); object[] obj = { invHis[0].InventoryHistoryKey }; _inventoryHistoryRepository.DeleteWithKeys(obj, true);