public static QueryData GetQueryData(QueryModel queryModel)
        {
            var vistor = new MongoQueryModelVistor();

            vistor.VisitQueryModel(queryModel);
            return(vistor.queryData);
        }
Beispiel #2
0
        QueryData GetQueryData <T>(QueryModel queryModel)
        {
            var query = MongoQueryModelVistor.GetQueryData(queryModel);

            if (query.EntityType != typeof(T))
            {
                throw new ArgumentException();
            }

            return(query);
        }
Beispiel #3
0
 protected override Expression VisitMemberExpression(MemberExpression expression)
 {
     VisitExpression(expression.Expression);
     name = MongoQueryModelVistor.GetMemberName(expression);
     return(expression);
 }