How to get loggedin user name using this constructor of ApplicationDbContext, using ILoggedInUserService loggedInUserService
public ApplicationDbContext(DbContextOptions
: base(options)
{
_loggedInUserService = loggedInUserService;
}
Please do tell if anyone knew regarding this.

Paul Awomi25 reputationPosted Oct 4, 2022, 2:24 AM EDT
You can even get the username of the logged in user without using the constructor by simply writing the following line of codes:
string username = User.Identity.Name;