Ejemplo n.º 1
0
        public IActionResult Get()
        {
            var rv = new
            {
                singleton    = _singletonService.GetValue(),
                transient    = _transientService.GetValue(),
                scoped       = _scopedService.GetValue(),
                otherService = new
                {
                    singleton = _otherService.GetFromSingleton(),
                    transient = _otherService.GetFromTransient(),
                    scoped    = _otherService.GetFromScoped()
                }
            };

            return(Ok(rv));
        }
Ejemplo n.º 2
0
 public Guid GetFromScoped()
 {
     return(_scopedService.GetValue());
 }