Ejemplo n.º 1
0
        private static void CustomerDetails()
        {
            CustomerManager customerManager = new CustomerManager(new EfCustomerDal(), new UserManager(new EfUserDal()));

            foreach (var customer in customerManager.GetAllCustomerDetails().Data)
            {
                Console.WriteLine(" Customer ID:" + customer.CustomerId + " Name: " + customer.FirstName + " Surname: " + customer.LastName + " CompanyName " + customer.CompanyName + " Email adress: " + customer.EmailAddress);
            }
        }
Ejemplo n.º 2
0
        private static void GetCustomerDetailsDto(CustomerManager customerManager)
        {
            Console.WriteLine("---------- Müşteri Listesi ----------");

            var result = customerManager.GetAllCustomerDetails();

            if (result.Data.Count() > 0)
            {
                Console.WriteLine($"Müşteri sayısı: {result.Data.Count()}");
                Console.WriteLine(" ");

                foreach (var customer in result.Data)
                {
                    Console.WriteLine($"Customer Id: {customer.CustomerId}\nCompany Name: {customer.CompanyName}\nFirst Name: {customer.UserFirstName}\nLast Name: {customer.UserLastName}\nE-Mail: {customer.EMail}");
                    Console.WriteLine("----------------------------------");
                }
            }
            else
            {
                Console.WriteLine(result.Message);
            }
        }