Returns the Expression Tree for non-datetime field reflection.
Expression <Func <T,> GetSearchExpression <T> (SearchString)
{
Expression <Func <T,> filter =;
(. IsNullOrEmpty (SearchString ));
Left = Expression. Parameter (T ),);
Expression expression = Expression. Constant ();
T obj = (T );
Type = (T );
Obj = (T) Activator. CreateInstance (type );
PropertyInfos = type. GetProperties ();
(PropertyInfo propertyInfos)
{
(PropertyInfo. Name. ToLower () = | propertyInfo. PropertyType = (DateTime ));
Expression tostring = Expression. Call
(
Expression. Property (left, (T). GetProperty (propertyInfo. Name). Name ),
(). GetMethod (, Type [] {})
);
Expression right = Expression. Call
(
Tostring,
(). GetMethod (, Type [] {()}),
Expression. Constant (SearchString)
);
Expression = Expression. Or (right, expression );
}
Filter = Expression. Lambda <Func <T,> (expression, [] {left });
Filter;
}