src/Shared/EntityFramework/Core/Mapping/Update/Internal/Propagator.Evaluator.cs
// <summary>
// Evaluates an 'and' expression given results of evalating its children.
// </summary>
// <param name="predicate"> And predicate </param>
// <returns> True if both child predicates are satisfied; false otherwise. </returns>
Evaluates an 'and' expression given results of evalating its children.
Evaluates an ' and ' expression given results of evalating its children .
public override PropagatorResult Visit(DbAndExpression predicate)
            {
                Check.NotNull(predicate, "predicate");
                var left = Visit(predicate.Left);
                var right = Visit(predicate.Right);
                var leftResult = ConvertResultToBool(left);
                var rightResult = ConvertResultToBool(right);
                bool? result;
                if ((leftResult.HasValue && !leftResult.Value && PreservedAndKnown(left))
                    ||
                    (rightResult.HasValue && !rightResult.Value && PreservedAndKnown(right)))
                {
                    return CreatePerservedAndKnownResult(false);
                }
                result = leftResult.And(rightResult);
                return ConvertBoolToResult(result, left, right);
            }
public override PropagatorResult Visit ( DbAndExpression predicate ) { Check . NotNull ( predicate , " " ) ; var left = Visit ( predicate . Left ) ; var right = Visit ( predicate . Right ) ; var leftResult = ConvertResultToBool ( left ) ; var rightResult = ConvertResultToBool ( right ) ; bool ? result ; if ( ( leftResult . HasValue && ! leftResult . Value && PreservedAndKnown ( left ) ) || ( rightResult . HasValue && ! rightResult . Value && PreservedAndKnown ( right ) ) ) { return CreatePerservedAndKnownResult ( false ) ; } result = leftResult . And ( rightResult ) ; return ConvertBoolToResult ( result , left , right ) ; }
Evaluates an 'and' expression given results of evalating its children.
Evaluates an ' and ' expression given results of evalating its children .
// Optimization: if either argument is false, preserved and known, return a // result that is false, preserved and known.
True if both child predicates are satisfied; false otherwise.
True if both child predicates are satisfied ; false otherwise .
predicate
DbAndExpression
None