Example #1
0
        public long Add(SeatAddCommand seat)
        {
            var seatAdd = Mapper.Map <SeatAddCommand, Seat>(seat);
            var newSeat = SeatRepository.Add(seatAdd);

            return(newSeat.Id);
        }
Example #2
0
        public IHttpActionResult Post(SeatAddCommand seat)
        {
            var validator = seat.Validation();

            if (!validator.IsValid)
            {
                return(HandleValidationFailure(validator.Errors));
            }
            return(HandleCallback(() => SeatAppService.Add(seat)));
        }