static void Main(string[] args) { IMobile mobile = MobileFactory.CreateMobile(BrandType.Apple); mobile.GetMobile(); Console.ReadKey(); }
public static void Main(string[] args) { IMobileFactory mobileFactory = new XiaomiFactory(); IMobile mobile = mobileFactory.GetMobile(ModelType.RedmiPro); mobile.GetMobile(); }
static void Main(string[] args) { IMobileFactory mobileFactory = new AppleFactory(); IMobile mobile = mobileFactory.GetMobile(ModelTypes.AppleIphone12); mobile.GetMobile(); Console.ReadKey(); }
private static void Main(string[] args) { IMobile mobile = MobileFactory.CreateMobile(BrandType.Samsung); mobile.GetMobile(); }
public async Task <IActionResult> Single(int id) { var mobile = await _mobile.GetMobile(id); return(View(mobile)); }