Exemple #1
0
        private static void GetCustomerByCompanyNameTest(string companyName)
        {
            CustomerManager customerManager = new CustomerManager(new EfCustomerDal());

            var      result = customerManager.GetByCompanyName(companyName);
            Customer customerByCompanyName = result.Data;

            if (result.Success == true)
            {
                string str = new string('_', 50);
                Console.WriteLine(str + "\n\n\tID\t\tUserID\t\tCompany Name\t");

                Console.WriteLine("\t{0}\t\t{1}\t\t{2}\t",
                                  customerByCompanyName.Id, customerByCompanyName.UserId, customerByCompanyName.CompanyName);

                Console.WriteLine(str + "\n");
            }
            else
            {
                Console.WriteLine(result.Message);
            }
        }