Beispiel #1
0
        public async Task <IActionResult> DeleteFilme(int?filmeId)
        {
            int result = 0;

            if (filmeId == null)
            {
                return(BadRequest());
            }

            try
            {
                result = await filmeRepository.DeleteFilme(filmeId);

                if (result == 0)
                {
                    return(NotFound());
                }
                return(Ok());
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }