protected internal virtual Expression VisitTypeImplementedByAll(TypeImplementedByAllExpression typeIba)
    {
        var column = (PrimaryKeyExpression)Visit(typeIba.TypeColumn);

        if (column != typeIba.TypeColumn)
        {
            return(new TypeImplementedByAllExpression(column));
        }

        return(typeIba);
    }
    public PrimaryKeyStringExpression(Expression id, TypeImplementedByAllExpression typeId)
        : base(DbExpressionType.PrimaryKeyString, typeof(PrimaryKey?))
    {
        if (id == null)
        {
            throw new ArgumentNullException(nameof(id));
        }

        if (id.Type != typeof(string))
        {
            throw new ArgumentException("id should be a string");
        }

        this.Id     = id;
        this.TypeId = typeId ?? throw new ArgumentNullException(nameof(typeId));
    }
    public ImplementedByAllExpression(Type type, Expression id, TypeImplementedByAllExpression typeId, IntervalExpression?externalPeriod)
        : base(DbExpressionType.ImplementedByAll, type)
    {
        if (id == null)
        {
            throw new ArgumentNullException(nameof(id));
        }

        if (id.Type != typeof(string))
        {
            throw new ArgumentException("string");
        }
        this.Id             = id;
        this.TypeId         = typeId ?? throw new ArgumentNullException(nameof(typeId));
        this.ExternalPeriod = externalPeriod;
    }
 private MethodCallExpression SchemaGetType(TypeImplementedByAllExpression typeIba)
 {
     return(Expression.Call(Expression.Constant(Schema.Current), miGetType, Visit(typeIba.TypeColumn).UnNullify()));
 }