Dapper Query和IList
public GoodDM GetDMGoods(int GoodsID, int BID) { GoodDM entity = new GoodDM(); var entity_Goods = bllGoods.GetGoodsDetail(GoodsID, BID); if (entity_Goods != null && entity_Goods.GoodsID != 0) { entity.Detaile = entity_Goods; IList<TM.SOA.Entity.DM.DM> Goods_DMList = new List<TM.SOA.Entity.DM.DM>(); Goods_DMList = GetDMListByGoods(BID,GoodsID,true);//查询得到的过滤过期的DM var MiaoShaList = Goods_DMList.Where(p => p.Type == (int)DMEnum.miao).ToList(); if (MiaoShaList != null && MiaoShaList.Count > 0) {//如果商品存在秒杀,直接返回秒杀 entity.IsMiao = true; entity.DMList = MiaoShaList; return entity; } entity.DMList = Goods_DMList; } entity.IsMiao = false; return entity; }
搜索
复制
标签:Goods,DMList,GoodsID,IList,Query,Dapper,entity,MiaoShaList From: https://www.cnblogs.com/jankie1122/p/10766529.html