public ActionResult Delete(Guid id, String reason)
        {
            //var repo = new ReservationRepository();
            //repo.DeleteReservation(id);

            var cmd = new CancelReservation()
            {
                ReservationId = id,
                Reason        = reason
            };

            AgileWays.Cqrs.Commands.Writer.ICommandWriter writer = new AzureCommandWriter();
            writer.SendCommand(cmd);
            //CloudHelper.EnqueueCommand(cmd);

            CloudHelper.LogMessage(1, "Canceled a reservation", "CANCEL");

            return(Json(new { isValid = true }, JsonRequestBehavior.AllowGet));
        }
        public ActionResult Create(ReservationModel model)
        {
            Guid id  = Guid.NewGuid();
            var  cmd = new CreateReservation()
            {
                Name          = model.Name,
                NumberOfSeats = model.NumberOfSeats,
                DiscountCode  = model.DiscountCode,
                ReservationId = id
            };

            //submit the command
            AgileWays.Cqrs.Commands.Writer.ICommandWriter writer = new AzureCommandWriter();
            writer.SendCommand(cmd);
            //CloudHelper.EnqueueCommand(cmd);

            CloudHelper.LogMessage(1, "Created a new reservation", "CREATE");

            //redirect to confirmation
            return(RedirectToAction("Confirmation", new { id = id }));
        }