public async Task <IActionResult> GetAsync([FromQuery] string search = null) { IEnumerable <Domain.Models.Tickets> tickets = await _repo.GetTicketsAsync(search); if (tickets.Count() == 0) { return(NotFound("Search returned no results.")); } else { IEnumerable <Tickets> resource = tickets.Select(Mapper.MapTickets); return(Ok(resource)); } }