예제 #1
0
        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));
            }
        }
예제 #2
0
 private static void TestGetSearchMatches(string searchFor)
 {
     Console.WriteLine($"Testing how many movies match code '{searchFor}'.");
     Console.WriteLine($"Matches: { _businessLogicLayer.GetSearchMatches(searchFor):N0}");
 }