Tested with EF 6.
It will return an array of objects for each primary key value for the given DbEntityEntry.
Their maybe edge cases where this does not work - but for my simple needs works great.
Hope this helps someone else.
object[] GetPrimaryKeyValue(DbEntityEntry entry)
{
List