Ganesh Shevate

Ganesh Shevate

  • 1.3k
  • 306
  • 24.6k

How to get Logged In User Name while creating or updating the record

Oct 1 2022 9:44 AM

How to get loggedin user name using this constructor of ApplicationDbContext, using ILoggedInUserService loggedInUserService

public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options, ILoggedInUserService loggedInUserService)
            : base(options)
        {
            _loggedInUserService = loggedInUserService;
        }

Please do tell if anyone knew regarding this.


Answers (1)