public static ExpressionMap Build(Expression expression)
        {
            var builder = new ExpressionMapBuilder();

            builder.Visit(expression);
            return(builder.result);
        }
        public static KeyExtractorNode <T> Build <T, TValue>(DomainModel model, Expression <Func <T, TValue> > expression)
        {
            if (!WellKnownOrmInterfaces.Entity.IsAssignableFrom(typeof(T)))
            {
                return(null);
            }
            var parameter = expression.Parameters.First();

            if (expression.Body == parameter)
            {
                return(null);
            }
            var map         = ExpressionMapBuilder.Build(expression);
            var builder     = new NodeBuilder(model, map, parameter);
            var nestedNodes = WrapNodes(builder.VisitRoot());

            return(new KeyExtractorNode <T>(GetExtractor <T>(), nestedNodes));
        }