상속: ICustomerDal
예제 #1
0
        private static void Demo()
        {
            SqlServerCustomerDal sqlServerCustomerDal    = new SqlServerCustomerDal();
            OracleCustomerDal    oracleServerCustomerDal = new OracleCustomerDal();


            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(sqlServerCustomerDal);
            customerManager.Delete(oracleServerCustomerDal);
            customerManager.Update(sqlServerCustomerDal);
        }
예제 #2
0
        static void Main(string[] args)
        {
            InterfaceIntro();

            // Interface ve abstract lar new lenemez.
            //IPerson person = new IPerson();  diyemeyiz.
            //IPerson person = new Customer(); //diyebiliriz.

            ICustomerDal customerDal = new SqlServerCustomerDal();

            customerDal.Add();
            ICustomerDal customerDal1 = new OracleCustomerDal();

            customerDal1.Add();
        }
예제 #3
0
        static void Main(string[] args)
        {
            //InterfacesIntro();

            //Demo();
            ICustomerDal[] customerDals = new ICustomerDal[3];
            customerDals[0] = new SqlServerCustomerDal();
            customerDals[1] = new OracleCustomerDal();
            customerDals[2] = new MySqlCustomerDal();
            foreach (var customerDal in customerDals)
            {
                customerDal.Add();
            }

            Console.ReadLine();
        }
예제 #4
0
        static void Main(string[] args)
        {
            // InterfacesIntro();
            //Demo();
            SqlServerCustomerDal sqlServerCustomerDal = new SqlServerCustomerDal();
            OracleCustomerDal    oracleCustomerDal    = new OracleCustomerDal();
            MySqlCustomerDal     mySqlCustomerDal     = new MySqlCustomerDal();

            ICustomerDal[] customerDals = new ICustomerDal[3] {
                sqlServerCustomerDal, oracleCustomerDal, mySqlCustomerDal
            };

            foreach (var customerDal in customerDals)
            {
                customerDal.Add(); //Sql Added. Oracle Added. MySql Added.
            }
        }