示例#1
0
 public static T GetCurrentUserAccount <T>(this IPrincipal user, DbSet <T> accountDbSet)
     where T : AccountBase
 => accountDbSet.GetUserAccount(
     user.GetCurrentUserClaim(ClaimTypes.NameIdentifier),
     user.Identity.AuthenticationType);