public async Task <IActionResult> PostOrCreateTransportSchedule(TransportScheduleViewModel transportScheduleViewModel) { try { var _serviceEndPoint = new ServicesEndPoint(_unitOfWork, _emailService); var transportSchedule = _Mapper.Map <TransportSchedule>(transportScheduleViewModel); var result = await _serviceEndPoint.PostCreateTransportVehicleScheduleBy(transportSchedule); if (!result) { return(NotFound(transportScheduleViewModel)); } return(Ok(new { message = "Succesfully Created!", result = result })); } catch (Exception ex) { return(BadRequest(ex.Message)); } }