示例#1
0
        public string Query(string filter, FilterGroup fg)
        {
            FilterGroup filterGroup = ConvertToObject <FilterGroup>(filter ?? "");
            string      whereSql    = FilterTranslator.ToSql(filterGroup);
            Expression <Func <Student, bool> > whereLambda = FilterTranslator.ToLambdaExpression <Student>(filterGroup ?? fg);

            return(ToJson(new { rows = MockStudents().Where(whereLambda), total = 1 }));
        }