示例#1
0
 public DTOs.Order Update([FromUri] int id, [FromBody] DTOs.Order order)
 {
     if (order.Status == (int)Consts.Decodes.OrderStatus.Canceled)
     {
         if (order.Participants != null)
         {
             foreach (var participant in order.Participants)
             {
                 participant.Status = (int)Consts.Decodes.InvitationStatus.Rejected;
                 _participantsQueryProcessor.Update(participant.Id ?? 0, participant);
             }
         }
     }
     return(_ordersQueryProcessor.Update(id, order));
 }