public static Role Load(Int32 roleId)
 {
     return(RoleDataSource.Load(roleId, true));
 }
Пример #2
0
        /// <summary>
        /// Loads a role instance given the name.
        /// </summary>
        /// <param name="name">The case-insensitive role name.</param>
        /// <returns>The role instance, or null if the role is not found.</returns>
        public static Role LoadForRolename(string name)
        {
            int roleId = RoleDataSource.GetIdByName(name);

            return(RoleDataSource.Load(roleId));
        }