protected virtual bool CompareMListElement(MListElementExpression a, MListElementExpression b) { return(a.Table == b.Table && Compare(a.RowId, b.RowId) && Compare(a.Element, b.Element) && Compare(a.Order, b.Order) && Compare(a.Parent, b.Parent)); }
protected internal virtual Expression VisitMListElement(MListElementExpression mle) { var rowId = (PrimaryKeyExpression)Visit(mle.RowId); var parent = (EntityExpression)Visit(mle.Parent); var order = Visit(mle.Order); var element = Visit(mle.Element); if (rowId != mle.RowId || parent != mle.Parent || order != mle.Order || element != mle.Element) { return(new MListElementExpression(rowId, parent, order, element, mle.Table)); } return(mle); }
protected internal override Expression VisitMListElement(MListElementExpression mle) { Type type = mle.Type; var bindings = new List <MemberAssignment> { Expression.Bind(type.GetProperty("RowId"), Visit(mle.RowId.UnNullify())), Expression.Bind(type.GetProperty("Parent"), Visit(mle.Parent)), }; if (mle.Order != null) { bindings.Add(Expression.Bind(type.GetProperty("Order"), Visit(mle.Order))); } bindings.Add(Expression.Bind(type.GetProperty("Element"), Visit(mle.Element))); var init = Expression.MemberInit(Expression.New(type), bindings); return(Expression.Condition(SmartEqualizer.NotEqualNullable(Visit(mle.RowId.Nullify()), NullId), init, Expression.Constant(null, init.Type))); }
protected internal override Expression VisitMListElement(MListElementExpression mle) { throw InvalidSqlExpression(mle); }
protected virtual Expression VisitMListElement(MListElementExpression mle) { var rowId = Visit(mle.RowId); var parent = (EntityExpression)Visit(mle.Parent); var element = Visit(mle.Element); if (rowId != mle.RowId || parent != mle.Parent || element != mle.Parent) return new MListElementExpression(rowId, parent, element, mle.Table); return mle; }
protected override Expression VisitMListElement(MListElementExpression mle) { throw InvalidSqlExpression(mle); }