public static ICollection <AbstractSearch> AddCustomSearchCriterion <T>(this ICollection <AbstractSearch> searchCriterias, Expression <Func <T, object> > property) { Type propertyType = null; string fullPropertyPath = GetPropertyPath(property, out propertyType); AbstractSearch searchCriteria = CreateSearchCriterion(typeof(T), propertyType, fullPropertyPath); if (searchCriteria != null) { searchCriterias.Add(searchCriteria); } return(searchCriterias); }