通过把两个实体放到同一个上下文
关键字 ObjContext(不能跨库使用)
使用前
OrderParentService orderParentService = new OrderParentService();
OrderItemService orderItemService = new OrderItemService();
var platform = Platform.EBay.ToString();
var datetime= DateTime.Now.AddMonths(-1);
//订单主表
var orderParentList = orderParentService.FindAll(p => p.PLATFORM == platform && p.ORDER_INSERT_DATE >= datetime).Select(p => p.ORDER_ID);
//订单详情
var orderItemList = orderItemService.FindAll(p => orderParentList.Contains(p.ORDER_ID) && p.ASIN == null);
使用后
OrderParentService orderParentService = new OrderParentService();
var op = orderParentService.ObjContext;
OrderItemService orderItemService = new OrderItemService();
orde