How can I use Entity Framework to do a common LINQ query on a properties with different names?
===

Using Entity Framework 4.0, I've defined two simple Entities with generated code that looks like this:

    public partial class Person : EntityObject
    {
       public string Name { ... generated code ... }
       public DateTime Birthday { ... generated code ... }
    }
    
    public partial class Sale : EntityObject
    {
       public int ProductId { ... generated code ... }
       public DateTime DateSold { ... generated code ... }
    }

This particular example is contrived, but represents a real problem I'm facing.  Often in my code, I want to restrict Entities to ones that appear in a particular date range.  So I have a lot of instances of:

    entities.Sales.Where(sale => sale.DateSold > startDate && sale.DateSold < endDate);
    
    entities.People.Where(person => person.Birthday > startDate && person.Birthday < endDate);

**is it possible to set up a common method that can handle this?**  Something like

`entities.Sales.WithinRange(startDate, endDate);` would be perfect, and I realize that I could set up an extension method for each and every `IQueryable<T>`, but I'd like to flexibility to be able to use the WithinRange() method inside common code.  For example:

    public static IQueryable<T> GetSortedNonNullObjectsInRange<T>(this IQueryable<T> data, DateTime startDate, DateTime endDate) where T : IHasDateDefined
    {
       return data.Where(entity => entity != null).WhereInRange(startDate, endDate).OrderBy(entity => entity.Date);
    }

when I try to use a common interface (like IHasDateDefined), I have the Date property on the interface return the Birthday or DateSold as appropriate, but then Entity Framework throws errors that it can't build an expression.