Skip to content

Instantly share code, notes, and snippets.

Rodrigo Kono rodrigokono

Block or report user

Report or block rodrigokono

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rodrigokono / gist:2907855
Created Jun 11, 2012
IQueryable Dynamic Expressions
View gist:2907855
public static class QueryableExtensions
public static IQueryable<T> Filter<T>(this IQueryable<T> queryable, IEnumerable<KeyValuePair<string, string>> filters) where T : class
foreach (var filter in filters)
var propertyName = typeof(T).GetProperties().Select(x => x.Name).SingleOrDefault(x => x.ToLower() == filter.Key.ToLower());
if (propertyName.IsNullOrWhiteSpace()) continue;
var parameterExpression = Expression.Parameter(typeof(T));
var propertyExpression = Expression.Property(parameterExpression, propertyName);
View "devenv.exe.config"
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy usesystemdefault="True" />
<ipv6 enabled="true"/>
<servicePointManager expect100Continue="false" />
You can’t perform that action at this time.