Answers for "how get the user show mvc controller core 3.1"

C#
0

how get the user show mvc controller core 3.1

string userName = _httpContextAccessor.HttpContext.User.Identity.Name;
Posted by: Guest on July-10-2020
0

how get the user show mvc controller core 3.1

public string LoggedInUser => User.Identity.Name;
Posted by: Guest on July-10-2020
0

how get the user show mvc controller core 3.1

services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
Posted by: Guest on July-10-2020
0

how get the user show mvc controller core 3.1

private readonly IHttpContextAccessor _httpContextAccessor;
//constructor then
_httpContextAccessor = httpContextAccessor;
Posted by: Guest on July-10-2020

Code answers related to "how get the user show mvc controller core 3.1"

C# Answers by Framework

Browse Popular Code Answers by Language