// GET: AsusPhone
        public ActionResult Index()
        {
            AsusPhone strHome = new AsusPhone();

            List <AsusPhone> obj = strHome.GetHome();

            return(View(obj));
        }
Example #2
0
        private static void Main(string[] args)
        {
            //IBattery battery = new SamsungBattery();

            //MobilePhone phone = new AsusPhone(battery);
            //phone.TryReplaceBattery();

            //Console.WriteLine(" ");

            //phone = new IPhoneX(battery);
            //phone.TryReplaceBattery();

            IBattery battery = _dIContainer.Resolve <ISamsungBattery>();

            MobilePhone phone = new AsusPhone(battery);

            phone.TryReplaceBattery();

            Console.WriteLine(" ");

            phone = new IPhoneX(battery);
            phone.TryReplaceBattery();
        }