Is it possible to get max value of a pk column using EF? I mean something like find method which gets an entity based on pk values, we already have this:
public TEntity Find(params object[] keyValues);
I'm looking for something like :
public object PkMax<TEntity>();//which returns max of pk column
Update:
I'm looking for dynamic linq query based on the entity's pk and currently I know how to get the pk thanks to this SO answer: How to get the Primary Key(s) in Entity Framework 4.1, i.e. using DbContext