Horje
how get the user show mvc controller core 3.1 Code Example
how get the user show mvc controller core 3.1
string userName = _httpContextAccessor.HttpContext.User.Identity.Name;
how get the user show mvc controller core 3.1
public string LoggedInUser => User.Identity.Name;
how get the user show mvc controller core 3.1
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
how get the user show mvc controller core 3.1
private readonly IHttpContextAccessor _httpContextAccessor;
//constructor then
_httpContextAccessor = httpContextAccessor;




Csharp

Related
and operator in c# Code Example and operator in c# Code Example
get connection string from web.config in c# Code Example get connection string from web.config in c# Code Example
c# randize list Code Example c# randize list Code Example
or in if statement c# Code Example or in if statement c# Code Example
c# compress string Code Example c# compress string Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11