public bool IsUserInRole(SystemUserRoleDescriptionEnum systemRole)
        {
            int roleId = (int)systemRole;
            int count  = (from sur in this
                          where sur.RoleID == roleId
                          select sur).Count <SystemUserRole>();

            return(count > 0);
        }
        public SystemUserCollection GetUsersByRole(SystemUserRoleDescriptionEnum systemUserRoleDescriptionEnum, bool isActive)
        {
            SystemUserCollection users = new SystemUserCollection();
            var query = from su in this where su.Active == isActive && su.IsUserInRole(systemUserRoleDescriptionEnum) == true || su.UserId == 0 select su;

            foreach (SystemUser user in query)
            {
                users.Add(user);
            }
            return(users);
        }