src/Inflatable/LinqExpression/WhereClauses/WhereClause.cs
/// <summary>
/// Optimizes the operator based on the mapping source.
/// </summary>
/// <param name="mappingSource">The mapping source.</param>
Optimizes the operator based on the mapping source.
Optimizes the operator based on the mapping source .
public IOperator Optimize(IMappingSource mappingSource)
        {
            if (InternalOperator is null)
            {
                return this;
            }
            var IsValid = mappingSource.GetChildMappings(ObjectType).Any();
            InternalOperator = IsValid ?
                InternalOperator.Optimize(mappingSource) :
                null;
            if (InternalOperator?.TypeCode != typeof(bool))
            {
                InternalOperator = null;
            }
            return this;
        }
public IOperator Optimize ( IMappingSource mappingSource ) { if ( InternalOperator is null ) { return this ; } var IsValid = mappingSource . GetChildMappings ( ObjectType ) . Any ( ) ; InternalOperator = IsValid ? InternalOperator . Optimize ( mappingSource ) : null ; if ( InternalOperator ? . TypeCode != typeof ( bool ) ) { InternalOperator = null ; } return this ; }
Optimizes the operator based on the mapping source.
Optimizes the operator based on the mapping source .
mappingSource
IMappingSource
The mapping source.
The mapping source .