///<summary>Searches customer by passing Business Logic customer object to handler class and printing result fom db</summary> public List <Customer> SearchCustomer() { Console.WriteLine("Enter name in fields that apply, if unknown, leave blank"); Console.WriteLine("Enter First Name: "); string firstName = Console.ReadLine(); Console.WriteLine("Enter Last Name: "); string lastName = Console.ReadLine(); try { CustomerHandler ch = new CustomerHandler(); List <Customer> c = ch.Search(firstName, lastName); Log.Information($"Search customer with name: {firstName} {lastName}"); if (c.Count > 0) { Console.WriteLine(c.Count + " customers found"); int i = 0; foreach (Customer cust in c) { Console.WriteLine("[" + i + "] Name: " + cust.FirstName + " " + cust.LastName + " City: " + cust.CustAddress.City); i++; } Log.Information(c.Count + " customers found"); } else { throw new CustomerNotFoundException("No customer found"); } return(c); } catch (CustomerException ex) { throw ex; } catch (NotImplementedException ex) { throw ex; } catch (CustomerNotFoundException ex) { throw ex; } }