public IActionResult Index() { ViewBag.ServiceA = _serviceA.Run(); ViewBag.ServiceB = _serviceB.Run(); ViewBag.ServiceC = _serviceC.Run(); return(View()); }
public IActionResult Index2() { IServiceA serviceA = DependencyResolver.Current.GetService <IServiceA>(); IServiceB serviceB = DependencyResolver.Current.GetService <IServiceB>(); IServiceC serviceC = DependencyResolver.Current.GetService <IServiceC>(); ViewBag.ServiceA = serviceA.Run(); ViewBag.ServiceB = serviceB.Run(); ViewBag.ServiceC = serviceC.Run(); return(View("Index")); }
public IActionResult Index() { InputDTO inputA = new InputDTO(); inputA.str = "ServiceA"; ViewBag.ServiceA = _serviceA.Run(inputA); InputDTO inputB = new InputDTO(); inputB.str = "ServiceB"; ViewBag.ServiceB = _serviceB.Run(inputB); InputDTO inputC = new InputDTO(); inputC.str = "ServiceC"; ViewBag.ServiceC = _serviceC.Run(inputC); return(View()); }