public static List <T> GetRoleIds <T>(this ISession session)
 {
     return(TypeConvert.ToList <T>(WebHttp.Identity.GetValue(ClaimTypes.RoleIds)));
 }
 public static T GetUserId <T>(this ISession session)
 {
     return(TypeConvert.To <T>(session.UserId));
 }
 public static T GetTenantId <T>(this ISession session)
 {
     return(TypeConvert.To <T>(WebHttp.Identity.GetValue(ClaimTypes.TenantId)));
 }
Beispiel #4
0
        public static T ToCast <T>(object valor)
        {
            var valorConvertido = valor.ToString();

            return((T)TypeConvert.To <T>(valorConvertido));
        }