public MarkClientAsArrivingCommandAnswer MarkClientAsArriving(MarkClientAsArrivingCommand command) { var reservations = reservationRepository.GetModels(); var reservation = reservations.FirstOrDefault(model => model.Id == command.ReservationId); reservation.CancelTime = null; reservationRepository.Update(reservation.Id, reservation); reservationRepository.SaveChanges(); var result = new MarkClientAsArrivingCommandAnswer { Token = (Guid)command.Token }; return result; }
public ActionResult MarkClientAsArriving(MarkClientAsArrivingCommand command) { var answer = _receptionMarkingService.MarkClientAsArriving(command); return RedirectToAction("Index", new { Token = answer.Token }); }