Ejemplo n.º 1
0
        public async Task <BookingHistoryResponseModel> UpdateHistory(BookingHistoryRequestModel historyRequest)
        {
            var history  = _mapper.Map <BookingHistory>(historyRequest);
            var response = await _historyRepository.UpdateAsync(history);

            return(_mapper.Map <BookingHistoryResponseModel>(response));
        }
Ejemplo n.º 2
0
        public async Task <BookingHistoryResponseModel> AddHistory(BookingHistoryRequestModel historyRequest)
        {
            var history = _mapper.Map <BookingHistory>(historyRequest);

            history.Status = "completed";
            var response = await _historyRepository.AddAsync(history);

            return(_mapper.Map <BookingHistoryResponseModel>(response));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> EditHistory(BookingHistoryRequestModel historyRequest)
        {
            var history = await _historyService.UpdateHistory(historyRequest);

            return(Ok(history));
        }