Exemplo n.º 1
0
        private static void Run()
        {
            IHelloService helloService = new HelloService();
            var           controller   = new HomeController(helloService);
            string        message      = controller.Greeting("Stephanie");

            Console.WriteLine(message);
        }
Exemplo n.º 2
0
        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));
        }