public IActionResult Index() { HttpContext.Response.WriteAsync($"Random Value from HomeController/Index :- {_randomStringService.ShowRandomString()} \n"); _dataProvider.WriteLog(); return(View()); }
public async Task Invoke(HttpContext httpContext, RandomStringService randomStringSService) { await httpContext.Response.WriteAsync($"Random Value From RandomStringMiddleware :- {randomStringSService.ShowRandomString()} \n"); await _next(httpContext); }