public JsonResult ChangeRoomType(ChangeRoomType command)
        {
            if (command.Id == null || command.Id.Equals(Guid.Empty))
            {
                return(Json(command));
            }

            Domain.Dispatcher.SendCommand(command);
            return(Json(command));
        }
        public IEnumerable Handle(Func <Guid, ContingentAggregate> al, ChangeRoomType command)
        {
            var contingentAggregate = al(command.Id);

            yield return(new RoomTypeChanged
            {
                Id = command.Id,
                RoomNumber = command.RoomNumber,
                Type = command.Type,
            });
        }
示例#3
0
 public RedirectToRouteResult ChangeRoomType(ChangeRoomType model)
 {
     return(this.RedirectToAction(c => c.Details(model.RoomId)));
 }