public override Fetch CreateQuery(EntityDefinition ed, IDictionary <string, object> parameters)
        {
            // the input links are appended to the query to filter the set of entities

            if (!parameters.ContainsKey("Links"))
            {
                return(null);
            }

            var links = parameters["Links"] as ICollection <Link>;

            if (links == null)
            {
                return(null);
            }

            var fetch = ed.CreateFetchExpression();

            if (Links != null && Links.Any())
            {
                // append the input links to the specified intermediate links

                var chains = Links.Clone();

                SetParameters(chains, links);

                fetch.Entity.Links = chains;
            }
            else
            {
                // assign the input links directly to the fetch

                fetch.Entity.Links = links;
            }

            // skip cache for ContentMap
            fetch.SkipCache = true;

            return(fetch);
        }
 public override Fetch CreateQuery(EntityDefinition ed, IDictionary <string, object> parameters)
 {
     return(ed.CreateFetchExpression());
 }