src/Shared/EntityFramework/Core/Mapping/Update/Internal/Propagator.Evaluator.cs
// <summary>
// Determines whether the argument being evaluated has a given type (declared in the IsOfOnly predicate).
// </summary>
// <param name="predicate"> IsOfOnly predicate. </param>
// <returns> True if the row being evaluated is of the requested type; false otherwise. </returns>
Determines whether the argument being evaluated has a given type (declared in the IsOfOnly predicate).
Determines whether the argument being evaluated has a given type ( declared in the IsOfOnly predicate ) .
public override PropagatorResult Visit(DbIsOfExpression predicate)
            {
                Check.NotNull(predicate, "predicate");
                if (DbExpressionKind.IsOfOnly
                    != predicate.ExpressionKind)
                {
                    throw ConstructNotSupportedException(predicate);
                }
                var childResult = Visit(predicate.Argument);
                bool result;
                if (childResult.IsNull)
                {
                    result = false;
                }
                else
                {
                    result = childResult.StructuralType.EdmEquals(predicate.OfType.EdmType);
                }
                return ConvertBoolToResult(result, childResult);
            }
public override PropagatorResult Visit ( DbIsOfExpression predicate ) { Check . NotNull ( predicate , " " ) ; if ( DbExpressionKind . IsOfOnly != predicate . ExpressionKind ) { throw ConstructNotSupportedException ( predicate ) ; } var childResult = Visit ( predicate . Argument ) ; bool result ; if ( childResult . IsNull ) { result = false ; } else { result = childResult . StructuralType . EdmEquals ( predicate . OfType . EdmType ) ; } return ConvertBoolToResult ( result , childResult ) ; }
Determines whether the argument being evaluated has a given type (declared in the IsOfOnly predicate).
Determines whether the argument being evaluated has a given type ( declared in the IsOfOnly predicate ) .
// Null value expressions are typed, but the semantics of null are slightly different.
True if the row being evaluated is of the requested type; false otherwise.
True if the row being evaluated is of the requested type ; false otherwise .
predicate
DbIsOfExpression
None