public List <CreditResource> GetCredits(int?movieId) { if (movieId.HasValue) { return(_creditService.GetAllCreditsForMovie(movieId.Value).ToResource()); } return(_creditService.GetAllCredits().ToResource()); }
private List <CreditResource> GetCredits() { var movieIdQuery = Request.Query.MovieId; if (movieIdQuery.HasValue) { int movieId = Convert.ToInt32(movieIdQuery.Value); return(_creditService.GetAllCreditsForMovie(movieId).ToResource()); } return(_creditService.GetAllCredits().ToResource()); }