Here are the examples of the csharp api class System.Data.Common.CommandTrees.Internal.ViewSimplifier.FlattenOr(System.Data.Common.CommandTrees.DbExpression) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
1. Example
View licenseinternal static bool TryMatchDiscriminatorPredicate(DbFilterExpression filter, Action<DbComparisonExpression, object> onMatchedComparison) { EdmProperty discriminatorProperty = null; // check each assignment in predicate foreach (var term in FlattenOr(filter.Predicate)) { DbPropertyExpression currentDiscriminator; object discriminatorValue; if (!TryMatchPropertyEqualsValue(term, filter.Input.VariableName, out currentDiscriminator, out discriminatorValue)) { return false; } // must be the same discriminator in every case if (null == discriminatorProperty) { discriminatorProperty = (EdmProperty)currentDiscriminator.Property; } else if (discriminatorProperty != currentDiscriminator.Property) { return false; } onMatchedComparison((DbComparisonExpression)term, discriminatorValue); } return true; }
0
2. Example
View licenseprivate static DbExpression SimplifyNestedTphDiscriminator(DbExpression expression) { /n ..... /n //View Source file for more details /n }