/// <summary> /// obtains a user roles /// </summary> /// <param name="session">framework that establishes communication between the application and the database</param> /// <param name="context">HTTP context</param> /// <returns>returns a list of roles</returns> public static IEnumerable <Rol> GetRols(ISession session, HttpContextBase context) { RolRepository objrol = new RolRepository(session); int userId = (context.User as CustomPrincipal).UserId; return(objrol.GetRols(userId)); }