Esempio n. 1
0
        public async Task <bool> DeleteTravel(Guid id)
        {
            var travelToDelete = await TravelRepository.GetByIdAsync(id);

            if (travelToDelete == null)
            {
                throw new NotFoundException("Путешествие не найдено!");
            }

            await TravelRepository.DeleteAsync(travelToDelete);

            return(true);
        }