예제 #1
0
 public string GetSingleton() => _singletonsalutante.SayHello();
예제 #2
0
        public ActionResult <IEnumerable <string> > Saluta()
        {
            Response.Cookies.Append("ciccio", "baliccio");

            return(new JsonResult(new {
                controller = new { transient = _transientsalutante.SayHello(), scoped = _scopedsalutante.SayHello(), singleton = _singletonsalutante.SayHello() },
                service = new { transient = _service.GetTransient(), scoped = _service.GetScoped(), singleton = _service.GetSingleton() }
            }));
        }