/// <summary> /// Filters the data in the <see cref="T:System.Linq.IQueryable"/> object based on the parameters specifed and appends those parameters to the object prior to SQL execution. /// </summary> /// <param name="filterProperty">A <see cref="T:System.String"/> value indicating the name of a public, non-static property member of type 'T' to compare.</param> /// <param name="filterValue">A <see cref="T:System.Object"/> value indicating the value(s) to compare against.</param> /// <param name="op">A value from the <see cref="T:RainstormStudios.Data.Linq.ComparisonOperator"/> enumeration indicating how the data will be compared.</param> /// <param name="matchCase">A value of type <see cref="T:System.Boolean"/> indicating true if the comparison should be case sensitive. Otherwise, false.</param> /// <returns>A value of type <see cref="T:System.Linq.IQueryable"/> containing the data matching the filter requirements.</returns> public static IQueryable Filter(this IQueryable data, string filterProperty, object filterValue, Linq.ComparisonOperator op, bool matchCase = false) { return(RainstormStudios.Data.Linq.DataHelper.FilterResult(data, filterProperty, filterValue, op, matchCase)); }
/// <summary> /// Filters the data in the generic <see cref="T:System.Linq.IQueryable"/> object based on the parameters specified and appends those parameters to the object prior to SQL execution. /// </summary> /// <typeparam name="T">The non-generic data type of the source <see cref="T:System.Linq.IQueryable"/> data.</typeparam> /// <param name="filterProperty">A <see cref="T:System.String"/> value indicating the name of a public, non-static property member of type 'T' to compare.</param> /// <param name="filterValue">A <see cref="T:System.Object"/> value indicating the value(s) to compare against.</param> /// <param name="op">A value from the <see cref="T:RainstormStudios.Data.Linq.ComparisonOperator"/> enumeration indicating how the data will be compared.</param> /// <param name="matchCase">A value of type <see cref="T:System.Boolean"/> indicating true if the comparison should be case sensitive. Otherwise, false.</param> /// <returns>A value of type <see cref="T:System.Linq.IQueryable"/> containing the data matching the filter requirements.</returns> public static IQueryable <T> Filter <T>(this IQueryable <T> data, string filterProperty, object filterValue, Linq.ComparisonOperator op, bool matchCase = false) { return((IQueryable <T>)Filter((IQueryable)data, filterProperty, filterValue, op, matchCase)); }