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 }"); }
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); }