Example #1
0
        public async Task DeleteSightAsync(int id)
        {
            var existingSight = await _sightsRepository.FindByIdAsync(id);

            if (existingSight == null)
            {
                throw new ObjectNotFoundException($"Sight with id {id} does not exist");
            }
            await _sightsRepository.DeleteAsync(id);
        }