|
|
@@ -202,10 +202,10 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services |
|
|
|
if (goods == null) throw Oops.Oh("商品不存在"); |
|
|
|
var goodsbom = _db.Queryable<BPA_GoodsBom>().Where(x => x.Goods_Id == id).ToList(); |
|
|
|
var goodsTechnology = _db.Queryable<BPA_GoodsTechnologyAction>().Where(x => x.GoodsId == id).ToList(); |
|
|
|
var FoodMenuGoods = _db.Queryable<BPA_FoodMenuGoods>().Where(x => x.GoodsId == id).ToList(); |
|
|
|
//var FoodMenuGoods = _db.Queryable<BPA_FoodMenuGoods>().Where(x => x.GoodsId == id).ToList(); |
|
|
|
await _db.Deleteable(goodsbom).ExecuteCommandAsync(); |
|
|
|
await _db.Deleteable(goodsTechnology).ExecuteCommandAsync(); |
|
|
|
await _db.Deleteable(FoodMenuGoods).ExecuteCommandAsync(); |
|
|
|
//await _db.Deleteable(FoodMenuGoods).ExecuteCommandAsync(); |
|
|
|
var res = await _db.Deleteable(goods).ExecuteCommandAsync(); |
|
|
|
_db.Ado.CommitTran(); |
|
|
|
return res > 0; |
|
|
|