Beispiel #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));
        }
Beispiel #2
0
 public Guid GetFromSingleton()
 {
     return(_singletonService.GetValue());
 }