Пример #1
0
        public async Task <IActionResult> GetByIdAsync(int id)
        {
            var TravelResult = await _TravelGenericServices.GetByIdAsync(id);

            if (TravelResult is null)
            {
                throw new NotFoundException(ErrorConstants.BLASACARTravelNotFoundException);
            }

            return(Ok(_mapper.Map <TravelDTO>(TravelResult)));
        }
        public async Task <IActionResult> Get(int id)
        {
            var DossierResult = await _DossierGenericServices.GetByIdAsync(id);

            if (DossierResult is null)
            {
                return(BadRequest());
            }

            return(Ok(DossierResult));
        }