public void Update4Print(ShippingOrderModel model, Intime.OPC.Domain.Dto.Request.DeliveryOrderPrintRequest request, int userId) { if (request == null) { throw new ArgumentNullException("request"); } Action(db => { var entity = EFHelper.Find <OPC_ShippingSale>(db, model.Id); if (entity == null) { throw new ShippingSaleException(String.Format("没有找到 快递单{0},请重新选择或与管理员联系", model.Id)); } entity.PrintTimes = entity.PrintTimes + request.Times ?? 1; //entity.UpdateUser = userId; //entity.UpdateDate = DateTime.Now; var fieldUpdate = new List <string>(); fieldUpdate.Add("PrintTimes"); //fieldUpdate.Add("UpdateUser"); //fieldUpdate.Add("UpdateDate"); EFHelper.UpdateEntityFields(db, entity, fieldUpdate); }); }