public async Task <ActionResult> DeleteMovieRating(int id) { try { await _movieRatingRepository.Delete(id); return(NoContent()); } catch (MovieRatingNotFoundException e) { return(NotFound(new { message = e.Message })); } catch (Exception e) { return(StatusCode(StatusCodes.Status500InternalServerError, new { message = e.Message })); } }