public SeatReservedEvent Reserve(IViewingState state, int idOfSeatToReserve) { if (state.Seats[idOfSeatToReserve].IsReserved) { throw new Exception("Seat already reserved"); } return(new SeatReservedEvent(state.ViewingId, new SeatId((ushort)idOfSeatToReserve))); }
public SeatReservedEvent ReserveSeat(IViewingState state, int idOfSeatToReserve) { return(seatInViewingEntity.Reserve(state, idOfSeatToReserve)); }