using System.Linq.Expressions;
using System.Linq.Dynamic;
using System.Collections.Generic;
public string Name { get; set; }
public int Age { get; set; }
public int Weight { get; set; }
public DateTime FavouriteDay { get; set; }
public static void Main()
const string exp = @"!string.IsNullOrEmpty(Person.Name)";
var p = Expression.Parameter(typeof(Person), "Person");
var e = System.Linq.Dynamic.DynamicExpression.ParseLambda(new[] { p }, null, exp);
FavouriteDay = new DateTime(2000,1,1)
FavouriteDay = new DateTime(2000,1,1)
var persons = new List<Person>{bob,john};
var result = persons.Where(x => (bool)e.Compile().DynamicInvoke(x) == true);
Console.WriteLine(result.Count());