public async Task <IActionResult> Delete(int id)
        {
            try
            {
                await _genresService.Delete(id);

                return(new NoContentResult());
            }
            catch (InvalidOperationException)
            {
                return(NotFound(new { message = "Genre with specified id is not found" }));
            }
        }
Exemplo n.º 2
0
        public async Task <EntityDto> Delete(long id)
        {
            var result = await _genresService.Delete(id, true);

            return(result);
        }