Are you using Entity Framework? If so then could you do something like this with generics?
public static IList<T> ParseExpression<T>(string Condition, string FilterColumn) where T:class
{
var query = dbContext
.CreateObjectSet<T>()
.AsQueryable();
//add filters etc.
return query.ToList();
}
You would then have to pass the required entity type as a type argument to your method like this:
FilterRecords.ParseExpression<OrdsRlsd>(condition, filterColumn);