Rock.Model.GroupTypeService.GetByDefaultGroupRoleId C# (CSharp) Method

GetByDefaultGroupRoleId() public method

Returns an enumerable collection of Rock.Model.GroupType entities by the Id of their Rock.Model.GroupTypeRole.
public GetByDefaultGroupRoleId ( int defaultGroupRoleId ) : IEnumerable
defaultGroupRoleId int An representing the Id of the to search by.
return IEnumerable
        public IEnumerable<GroupType> GetByDefaultGroupRoleId( int? defaultGroupRoleId )
        {
            return Queryable().Where( t => ( t.DefaultGroupRoleId == defaultGroupRoleId || ( defaultGroupRoleId == null && t.DefaultGroupRoleId == null ) ) );
        }