ClubQuery question


How can I write a ClubQuery that only returns clubs that have a logotype, their integer attribute "intAtt"=1 and are sorted by their number of ratings?

Thanks in advance!

#22927 Aug 20, 2008 20:13
  • tost
    Member since: 2007

    Hi Mattias,

    I'm sorry to say that it is not possible to sort on number of ratings, but below you can find the query without the sort.

    ClubQuery q = new ClubQuery();
    q.Logotype = new ImageCriterion();
    q.Logotype.ID = new IntegerCriterion();
    q.Logotype.ID.Value = 0;
    q.Logotype.ID.Operator = ComparisonOperator.GreaterThan;

    IntegerCriterion intAtt = new IntegerCriterion();
    intAtt.Value = 1;
    q["intAtt"] = intAtt;

    ClubCollection clubs = QueryHandler.GetQueryResult(q);

    Best regards,


    #27289 Jan 23, 2009 16:24