Ejemplo n.º 1
0
        public IActionResult GetMovies(int yor, string title, string genre)
        {
            if (yor <= 0 && string.IsNullOrEmpty(title) && string.IsNullOrEmpty(genre))
            {
                return(BadRequest());
            }

            var ret = moviesBL.GetMovieByCriteria(yor, title, genre);

            if (ret == null || ret.Count == 0)
            {
                return(NotFound());
            }
            return(Ok(ret));
        }