BstAutoLog.Web 10.0.1
How to use
Program.cs
services.AddAutoLog<ApplicationDbContext>();
services.AddAutoLogWebServices(options => {
options.UserTypeClaim = "user_type"; // optional: claim type for UserType field
});
// UserTypeClaim is the claim type used to extract the UserType field from the authenticated user's claims. If not set, UserType will be null.
Model.cs
: IHasAutoLog
ApplicationDbContext.cs
builder.ConfigureAutoLog();
User information (UserId, UserName, UserType) and IP address are automatically extracted from HttpContext.
No packages depend on BstAutoLog.Web.
.NET 10.0
- BstAutoLog (>= 10.1.1)
- BstHelpers.Web (>= 10.0.6)