public override void Execute(CommandSwitchValues values) { int id = values.GetSwitchAsInt("-id"); using (var orderController = ControllerFactory.MakeOrderController()) { ReportGenerator generator = new ReportGenerator(Console.Out); generator.DisplayOrder(orderController.GetOrderbyId(id)); } }