Ejemplo n.º 1
0
        public static Int32 SearchDebateCount(Int32 tid, Int32 opinion)
        {
            var exp = _.Invisible == 0;

            if (tid > 0)
            {
                exp &= _.Tid == tid & _.Layer == 0;
            }
            if (opinion > 0)
            {
                exp |= _.ID.In(PostDebateField.FindSQLByTidAndOpinion(tid, opinion));
            }

            return(FindCount(exp));
        }
Ejemplo n.º 2
0
        public static EntityList <Post> SearchDebate(Int32 tid, Int32 opinion, Int32 start, Int32 max)
        {
            var exp = _.Invisible == 0;

            if (tid > 0)
            {
                exp &= _.Tid == tid & _.Layer == 0;
            }
            if (opinion > 0)
            {
                exp |= _.ID.In(PostDebateField.FindSQLByTidAndOpinion(tid, opinion));
            }

            return(FindAll(exp, null, null, start, max));
        }