Example #1
0
        public IActionResult GetSearch(string name)
        {
            if (name.Length == 0)
            {
                return(BadRequest("Name is invalid!"));
            }
            List <Event> events = _srv.SearchEventByName(name);

            if (events == null)
            {
                return(NotFound($"No results found for events when searching for: {name}"));
            }
            return(Ok(events));
        }