public async Task <BookingHistoryResponseModel> UpdateHistory(BookingHistoryRequestModel historyRequest) { var history = _mapper.Map <BookingHistory>(historyRequest); var response = await _historyRepository.UpdateAsync(history); return(_mapper.Map <BookingHistoryResponseModel>(response)); }
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)); }
public async Task <IActionResult> EditHistory(BookingHistoryRequestModel historyRequest) { var history = await _historyService.UpdateHistory(historyRequest); return(Ok(history)); }