Ejemplo n.º 1
0
        public IActionResult Get(string name)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(name))
                {
                    return(BadRequest());
                }

                var result = _course.Filter(name);

                if (result == null)
                {
                    return(NotFound());
                }

                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex));
            }
        }