Exemplo n.º 1
0
        static void Main(string[] args)
        {
            IMobile mobile = MobileFactory.CreateMobile(BrandType.Apple);

            mobile.GetMobile();
            Console.ReadKey();
        }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            IMobileFactory mobileFactory = new XiaomiFactory();
            IMobile        mobile        = mobileFactory.GetMobile(ModelType.RedmiPro);

            mobile.GetMobile();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            IMobileFactory mobileFactory = new AppleFactory();
            IMobile        mobile        = mobileFactory.GetMobile(ModelTypes.AppleIphone12);

            mobile.GetMobile();
            Console.ReadKey();
        }
Exemplo n.º 4
0
        private static void Main(string[] args)
        {
            IMobile mobile = MobileFactory.CreateMobile(BrandType.Samsung);

            mobile.GetMobile();
        }
Exemplo n.º 5
0
        public async Task <IActionResult> Single(int id)
        {
            var mobile = await _mobile.GetMobile(id);

            return(View(mobile));
        }