public long Add(SeatAddCommand seat) { var seatAdd = Mapper.Map <SeatAddCommand, Seat>(seat); var newSeat = SeatRepository.Add(seatAdd); return(newSeat.Id); }
public IHttpActionResult Post(SeatAddCommand seat) { var validator = seat.Validation(); if (!validator.IsValid) { return(HandleValidationFailure(validator.Errors)); } return(HandleCallback(() => SeatAppService.Add(seat))); }