Ejemplo n.º 1
0
        public static FilterNode <ClrValue>?AdjustToModel(this FilterNode <ClrValue> filter, DomainId appId)
        {
            var result = AdaptionVisitor.AdaptFilter(filter);

            if (result != null)
            {
                result = AdaptIdVisitor.AdaptFilter(result, appId);
            }

            return(result);
        }
Ejemplo n.º 2
0
        public static ClrQuery AdjustToModel(this ClrQuery query, DomainId appId)
        {
            if (query.Filter != null)
            {
                query.Filter = AdaptionVisitor.AdaptFilter(query.Filter);
            }

            if (query.Filter != null)
            {
                query.Filter = AdaptIdVisitor.AdaptFilter(query.Filter, appId);
            }

            if (query.Sort != null)
            {
                query.Sort = query.Sort.Select(x => new SortNode(MapPath(x.Path), x.Order)).ToList();
            }

            return(query);
        }
Ejemplo n.º 3
0
        public static ClrQuery AdjustToModel(this ClrQuery query, DomainId appId)
        {
            if (query.Filter != null)
            {
                query.Filter = FirstPascalPathConverter <ClrValue> .Transform(query.Filter);
            }

            if (query.Filter != null)
            {
                query.Filter = AdaptIdVisitor.AdaptFilter(query.Filter, appId);
            }

            if (query.Sort != null)
            {
                query.Sort = query.Sort.Select(x => new SortNode(x.Path.ToFirstPascalCase(), x.Order)).ToList();
            }

            return(query);
        }