private static void Run() { IHelloService helloService = new HelloService(); var controller = new HomeController(helloService); string message = controller.Greeting("Stephanie"); Console.WriteLine(message); }
private static void RunAppWithoutContainer() { IHelloService service = new HelloService(); var controller = new HomeController(service); string greet = controller.Hello("Matthias"); Console.WriteLine(greet); }
public string Hello(string name) { var service = new HelloService(); return(service.Greeting(name)); }