Ejemplo n.º 1
0
        private static void InterfacesIntro()
        {
            PersonManager manager = new PersonManager();

            manager.Add(new Customer {
                Id = 1, FirstName = "Engin", LastName = "Demiroğ", CustomerAddress = "Ankara"
            });
            manager.Add(new Student {
                Id = 1, FirstName = "Derin", LastName = "Demiroğ", StudentNumber = "12345"
            });
        }
Ejemplo n.º 2
0
        private static void InterfacesIntro()
        {
            PersonManager personManager = new PersonManager();

            personManager.Add(new Customer
            {
                Id        = 1,
                FirstName = "Kubra",
                LastName  = "Sonmez",
                Address   = "Istanbul"
            });
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer {
                Id = 1, FirstName = "elyase", LastName = "keceli", CustomerNumber = "4323"
            };
            PersonManager personManager = new PersonManager();

            personManager.Add(customer1);
            personManager.Add(new Student {
                Id = 1, FirstName = "furkan", LastName = "bayrak", StudentNumber = "434"
            });
        }
Ejemplo n.º 4
0
        private static void Intro1()
        {
            PersonManager personManager = new PersonManager();
            Student       student1      = new Student {
                Id = 1, FirstName = "Ahmet", LastName = "Akçay", Department = "Bilgisayar Mühendisliği"
            };

            personManager.Add(new Customer {
                Id = 1, FirstName = "Ali", LastName = "Akçay", Address = "Ankara"
            });
            personManager.Add(student1);
        }
Ejemplo n.º 5
0
        private static void InterfacesIntro()
        {
            Customer customer = new Customer {
                FirstName = "Berat", Id = 1, LastName = "Akar", Address = "Kocaeli"
            };
            PersonManager manager = new PersonManager();
            Student       student = new Student {
                Id = 2, FirstName = "Ezgi", LastName = "Akar", Department = "Economics"
            };

            manager.Add(student);
            manager.Add(customer);
        }
Ejemplo n.º 6
0
        private static void InterfacesIntro()
        {
            PersonManager personManager = new PersonManager();
            Customer      customer      = new Customer()
            {
                Id        = 1,
                FirstName = "Seçkin",
                LastName  = "Bakır",
                Address   = "Antalya"
            };

            personManager.Add(customer);
        }
Ejemplo n.º 7
0
        static void Main(string[] args)
        {
            PersonManager personManager = new PersonManager();

            personManager.Add(new Customer {
                FirstName = "Tufan", Lastname = "Cevik", Address = "İzmir", Id = 1
            });

            IPerson customer = new Customer();

            personManager.Add(customer);
            Console.ReadLine();
        }
Ejemplo n.º 8
0
        static void Main(string[] args)
        {
            PersonManager manager = new PersonManager();
            Student       student = new Student();

            manager.Add(new Customer {
                Id = 1, FirstName = "Ekmek", LastName = "Çavdarlı"
            });
            manager.Add(new Student {
                Id = 1, FirstName = "Döner", LastName = "Tavuk", Departmant = "Fast Food"
            });
            Console.ReadLine();
        }
Ejemplo n.º 9
0
        private static void InterfaceIntro()
        {
            PersonManager manager = new PersonManager();

            manager.Add(new Customer {
                Id = 1, FirstName = "Bahadır", LastName = "Meriç", Address = "Küçükçekmece"
            });
            Console.ReadKey();
            manager.Add(new Student {
                Id = 1, FirstName = "Kemal", LastName = "Kara", Departman = "Yazılım"
            });
            Console.ReadKey();
        }
Ejemplo n.º 10
0
        private static void InterfacesIntro()
        {
            PersonManager person1 = new PersonManager();

            person1.Add(new Customer {
                Id = 1, FirstName = "İbrahim", LastName = "Kaplan", Address = "İzmir"
            });
            PersonManager person2 = new PersonManager();

            person1.Add(new Student {
                Id = 2, FirstName = "Efe", LastName = "Berber", Department = "B.M"
            });
        }
Ejemplo n.º 11
0
        static void Main(string[] args)
        {
            PersonManager manager = new PersonManager();



            // manager.Add(new Customer { Id = 1, FirstName = " Hümeyra", LastName = "Turgut", Address = "Kocaeli" });

            Customer customer = new Customer    //bu şekilde de yazılabilirdi.
            {
                Id        = 1,
                FirstName = " Hümeyra",
                LastName  = "Turgut",
                Address   = "Kocaeli"
            };

            Student student = new Student
            {
                Id         = 1,
                FirstName  = " Hasan",
                LastName   = "Turgut",
                Department = "Engineer"
            };

            manager.Add(customer);
            manager.Add(student); //ilk başta böyle yazınca hata verdi çünkü add metodunda customer istiyordu ama aşağıda IPerson yazınca hata vermez.



            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(new SqlServerCustomerDal());
            customerManager.Add(new OracleCustomerDal());   // inheritance sayesinde her duruma uyumlu hale geldi.



            ICustomerDal[] customerDals = new ICustomerDal[2]
            {
                new SqlServerCustomerDal(),
                new OracleCustomerDal()
            };

            foreach (var customerDal in customerDals)
            {
                customerDal.Add();
            }



            Console.ReadLine();
        }
Ejemplo n.º 12
0
        static void Main(string[] args)
        {
            ICustomerDal[] customerDals = new ICustomerDal[3]
            {
                new OracleCustomerDal(),
                new SqlServerCustomerDal(),
                new MySqlCustomerDal()
            };

            foreach (var customerDal in customerDals)
            {
                customerDal.Add();
            }



            /*
             * CustomerManager customerManager = new CustomerManager();
             * customerManager.Add(new OracleCustomerDal());
             * customerManager.Add(new SqlServerCustomerDal());
             * customerManager.Add(new MySqlCustomerDal());
             */



            PersonManager personManager = new PersonManager();

            Customer customer = new Customer()
            {
                Id        = 1,
                FirstName = "Emre",
                LastName  = "Erme",
                Address   = "Manhattan"
            };

            Console.ReadLine();

            Student student = new Student()
            {
                Id         = 1,
                FirstName  = "Derin",
                LastName   = "Gökyüzü",
                Department = "Software Developer"
            };

            personManager.Add(customer);
            personManager.Add(student);

            Console.ReadLine();
        }
Ejemplo n.º 13
0
        private static void InterFacesIntro()
        {
            PersonManager manager = new PersonManager();

            manager.Add(new Customer {
                Id = 1, FirstName = "Kaan", LastName = "Kaya", Address = "Istanbul"
            });
            manager.Add(new Student {
                Id = 1, FirstName = "Freddie", LastName = "Mercury", Departmant = "Music"
            });
            manager.Add(new Worker {
                Id = 1, FirstName = "Mahmut", LastName = "Telli", Departmant = "Imalatci"
            });
        }
Ejemplo n.º 14
0
        private static void InterfacesIntro()
        {
            PersonManager personManager = new PersonManager();
            Student       student       = new Student();

            student.Id        = 1;
            student.FirstName = "Murat";
            student.LastName  = "Ertürk";
            student.Departman = "Bass";
            personManager.Add(new Customer {
                Id = 1, FirstName = "Elif", LastName = "Ertürk", Address = "İstanbul"
            });
            personManager.Add(student);
        }
Ejemplo n.º 15
0
        private static void interfacesIntro()
        {
            PersonManager personManager = new PersonManager();

            personManager.Add(new Customer {
                Id = 1, FirstName = "utku", LastName = "mutlu", Address = "Edirne"
            });
            Console.WriteLine();
            Student student = new Student {
                Id = 2, FirstName = "Arzu", LastName = "mutlu", Department = "computer science"
            };

            personManager.Add(student);
        }
Ejemplo n.º 16
0
        private static void GetStartedInterface()
        {
            var cust = new Customer {
                FirstName = "hikmet", Address = "istanbul", Id = 1, LastName = "yarbasi"
            };
            var student = new Student()
            {
                FirstName = "Çiler", LastName = "Yarbaşı", Id = 2, Departmant = "Service Yönetim Hizmetleri"
            };
            PersonManager manager = new PersonManager();

            manager.Add(cust);
            manager.Add(student);
        }
Ejemplo n.º 17
0
        private static void InterfacesIntro()
        {
            PersonManager personManager = new PersonManager();

            personManager.Add(new Customer {
                Id = 1, FirstName = "Ekrem", LastName = "Alpay", Address = "Istanbul"
            });
            personManager.Add(new Student {
                Id = 2, FirstName = "Alpay", LastName = "Ekrem", Departmant = "Computer Engineering"
            });
            personManager.Add(new Worker {
                Id = 3, FirstName = "Bla", LastName = "Cla", Departmant = "IT"
            });
        }
Ejemplo n.º 18
0
        private static void InterfacesIntro()
        {
            IPerson person = new Customer()
            {
                Id = 1, FirstName = "Yasin"
            };

            person.LastName = "Özer";
            var result = person.FirstName;

            Console.WriteLine(result);

            PersonManager personManager = new PersonManager(person);

            personManager.Add();
        }
Ejemplo n.º 19
0
        private static void Example()
        {
            PersonManager personManager = new PersonManager();

            IPerson customer1 = new Customer {
                Id = 1, FirstName = "Onur", LastName = "Demir", Address = "İstanbul"
            };

            personManager.Add(customer1);

            IPerson student1 = new Student {
                Id = 1, FirstName = "Uğur", LastName = "Demir", Departmant = "Technology"
            };

            personManager.Add(student1);
        }
Ejemplo n.º 20
0
        private static void InterfacesIntro()
        {
            PersonManager manager   = new PersonManager();
            Customer      customer1 = new Customer()
            {
                Id = 1, FirstName = "Gokhan", LastName = "Goy", Address = "Ankara"
            };

            Student student1 = new Student()
            {
                Id = 12, FirstName = "Deloi", LastName = "Wex", Department = "Computer Engineering"
            };

            manager.Add(customer1); //I am able to use same method for same operation using
            manager.Add(student1);  //different instances of different classes.
        }
Ejemplo n.º 21
0
        private static void InterfacesIntro()
        {
            PersonManager personManager = new PersonManager();
            Customer      customer      = new Customer {
                Id = 1, FirstName = "Rıfat", LastName = "Orhan", Address = "İstanbul"
            };
            Student student = new Student
            {
                Id         = 1,
                FirstName  = "Orhan",
                LastName   = "Aliyev",
                Departmant = "Computer Science",
            };

            personManager.Add(student);
            personManager.Add(customer);
        }
Ejemplo n.º 22
0
        private static void InterfacesIntro()
        {
            PersonManager personManager = new PersonManager();
            Customer      customer      = new Customer()
            {
                Id        = 1,
                Firstname = "ENGİN",
                Lastname  = "demir",
                Address   = "ankara"
            };

            personManager.Add(new Student {
                Id = 1, Firstname = "derin", Lastname = "demir", Department = "computer science"
            });

            personManager.Add(customer);
        }
Ejemplo n.º 23
0
        private static void InterfaceIntro()
        {
            Customer customer = new Customer {
                Id = 1, FirstName = "Ali", LastName = "El", Address = "Kilis"
            };
            Student student = new Student
            {
                Id         = 2,
                FirstName  = "Ayşe",
                LastName   = "Sev",
                Departmant = "Engineering"
            };

            PersonManager personManager = new PersonManager();

            personManager.Add(new Customer());
        }
Ejemplo n.º 24
0
        private static void InterfacesIntro()
        {
            PersonManager personManager = new PersonManager();

            personManager.Add(new Customer {
                ID = 1, FirstName = "Ömer Faruk", LastName = "Çelik", Address = "İstanbul"
            });

            Student student = new Student();

            student.ID         = 3;
            student.FirstName  = "Ali";
            student.LastName   = "Veli";
            student.Departmant = "Software Engineering";

            personManager.Add(student);
        }
Ejemplo n.º 25
0
        private static void InterfacesIntro()
        {
            PersonManager manager = new PersonManager();

            manager.Add(new Customer {
                Id = 1, FirstName = "Engin", LastName = "Demiroğ", Adress = "Ankara"
            });

            Student student = new Student
            {
                Id         = 2,
                FirstName  = "Derin",
                LastName   = "Demiroğ",
                Department = "Computer Sciences"
            };

            manager.Add(student);
        }
Ejemplo n.º 26
0
        private static void InterfacesIntro()
        {
            PersonManager personManager = new PersonManager();
            //personManager.Add(new Customer { Id=1, FirstName="Arif", LastName="Tarpıcı",Address="Ankara"});
            Customer customer = new Customer {
                Id = 1, FirstName = "Arif", LastName = "Tarpıcı", Address = "Ankara"
            };
            Student student = new Student {
                Id = 2, FirstName = "Arif2", LastName = "Tarpıcı2", Departmant = "Computer Science"
            };
            Worker worker = new Worker {
                Id = 3, FirstName = "Arif3", LastName = "Tarpıcı3", Departmant = "Data Mining"
            };

            personManager.Add(customer);
            personManager.Add(student);
            personManager.Add(worker);
        }
Ejemplo n.º 27
0
        private static void InterfacesIntro()
        {
            PersonManager manager = new PersonManager();

            manager.Add(new Customer {
                Id = 1, FirstName = "Mustafa", LastName = "Guneruz", Address = "Ankara"
            });

            Student student = new Student
            {
                Id         = 1,
                FirstName  = "Ali",
                LastName   = "Veli",
                Department = "Computer Sciences"
            };

            manager.Add(student);
        }
Ejemplo n.º 28
0
        static void Main(string[] args)
        {
            PersonManager manager = new PersonManager();

            manager.Add(new Customer {
                Id = 1, FirstName = "Deniz", LastName = "Gunes", Adress = "Istanbul"
            });

            Student student = new Student()
            {
                Id         = 2,
                FirstName  = "Yasemin",
                LastName   = "Gunes",
                Departmant = "Industrial Engineering"
            };

            manager.Add(student);
            Console.ReadLine();
        }
Ejemplo n.º 29
0
        static void Main(string[] args)
        {
            PersonManager personManager = new PersonManager();
            Customer      customer      = new Customer
            {
                Id        = 2,
                FirstName = "Yaren",
                LastName  = "Gndgd",
                Adress    = "Eses"
            };

            Student student = new Student
            {
                Id         = 3,
                FirstName  = "Derin",
                LastName   = "Gndgd",
                Department = "Bilişim"
            };

            personManager.Add(customer);
            personManager.Add(student);


            IPerson person = new Student();
            IPerson perso2 = new Customer();


            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(new SqlServerCustomerDal());


            ICustomerDal[] customerDals = new ICustomerDal[2]
            {
                new SqlServerCustomerDal(),
                new OracleCustoemrDal()
            };
            foreach (var customerDal in customerDals)
            {
                customerDal.Add();
            }
        }
Ejemplo n.º 30
0
        static void Main(string[] args)
        {
            PersonManager manager  = new PersonManager();
            Customer      customer = new Customer
            {
                Id        = 1,
                FirstName = "ahmet selim",
                LastName  = "canpolat",
                Adress    = "istanbul"
            };
            Student student = new Student
            {
                Id         = 1,
                FirstName  = "mert1",
                LastName   = "dikan",
                Departmant = "ktü"
            };

            manager.Add(student);
            manager.Add(customer);

            //burası gerçek hayat örneği
            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(new SqlServerCustomerDal());


            ICustomerDal[] customerDals = new ICustomerDal[3]
            {
                new SqlServerCustomerDal(),
                new OracleCustomerDal(),
                new MYsqlCustomerDal()
            };

            foreach (var customerDal in customerDals)

            {
                customerDal.Add();
            }

            Console.ReadLine();
        }