Пример #1
0
        private async Task ValidateArtista(int id)
        {
            var author = await artistaRapository.GetArtistasAsync(id);

            if (author == null)
            {
                throw new NotFoundException("invalid author to delete");
            }
            artistaRapository.DetachEntity(author);
        }
Пример #2
0
        private async Task <ArtistaEntity> validarArtistaId(int id)
        {
            var artista = await windAppRepository.GetArtistasAsync(id);

            if (artista == null)
            {
                throw new NotFoundException($"cannot found artista with id {id}");
            }
            windAppRepository.DetachEntity(artista);
            return(artista);
        }