예제 #1
0
 private static ImplementedByExpression CombineIB(ImplementedByExpression a, ImplementedByExpression b, Type type, Func <Expression, Expression, Expression> combiner)
 {
     return(new ImplementedByExpression(type, a.Strategy,
                                        a.Implementations.OuterJoinDictionaryCC(b.Implementations,
                                                                                (t, ia, ib) => CombineEntity(ia ?? NullEntity(t), ib ?? NullEntity(t), t, combiner)
                                                                                )));
 }
예제 #2
0
    protected internal virtual Expression VisitImplementedBy(ImplementedByExpression ib)
    {
        var implementations = Visit(ib.Implementations, v => (EntityExpression)Visit(v));

        if (implementations != ib.Implementations)
        {
            return(new ImplementedByExpression(ib.Type, ib.Strategy, implementations));
        }
        return(ib);
    }
예제 #3
0
        internal override Expression GetExpression(Alias tableAlias, QueryBinder binder, Expression id)
        {
            var implementations = ImplementationColumns.SelectDictionary(t => t, (t, ic) =>
                                                                         new EntityExpression(t, new PrimaryKeyExpression(new ColumnExpression(ic.Type.Nullify(), tableAlias, ic.Name)), null, null, null, AvoidExpandOnRetrieving));

            var result = new ImplementedByExpression(IsLite ? Lite.Extract(FieldType) : FieldType, SplitStrategy, implementations);

            if (this.IsLite)
            {
                return(binder.MakeLite(result, null));
            }
            else
            {
                return(result);
            }
        }
예제 #4
0
 protected internal override Expression VisitImplementedBy(ImplementedByExpression rb)
 {
     return(rb.Implementations.Select(ee => new When(Visit(ee.Value.ExternalId).NotEqualsNulll(), Visit(ee.Value))).ToCondition(rb.Type));
 }