Exemple #1
0
        public async Task InvokeAsync(HttpContext context, IScopedService scopedService)
        {
            var singleton = _singletonSvc.GetData();
            var scoped    = scopedService.GetData();

            await context.Response.WriteAsync($"Singleton Data is { singleton }; Scoped Data is { scoped }");
        }
Exemple #2
0
        public async Task InvokeAsync(HttpContext context, RequestDelegate next)
        {
            await context.Response.WriteAsync($"This is From { GetType().Name }" +
                                              $"And Service Result is { _scopedService.GetData() } </br>");

            await next(context);
        }