public IActionResult GetSearchMatches(string searchFor) { try { _logger.LogInformation($"api/Movies/Search:GetSearchMatches: " + $"Search For: {searchFor}"); return(Ok(_businessLogicLayer.GetSearchMatches(searchFor))); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
private static void TestGetSearchMatches(string searchFor) { Console.WriteLine($"Testing how many movies match code '{searchFor}'."); Console.WriteLine($"Matches: { _businessLogicLayer.GetSearchMatches(searchFor):N0}"); }