It seems you might be able to get some useful information from the Target property of System.Data.Common.CommandTrees.DbModificationCommandTree.
In particular, for an update statement you may see the following structure associated with the Target property if you drill down a bit:
Target (DbExpressionBinding)
- Expression (DbScanExpression)
- Target (System.Data.Metadata.Edm.EntitySetBase)
- Name (string)
The Name refers to the name of the entity set in your entity container.
Similarly, you could examine the Predicate property of DbUpdateCommandTree or DbDeleteCommandTree to determine the key of the affected entity. For an entity with an integer column Id for a primary key, this structure could look like:
Predicate (DbComparisonExpression)
- Left (DbPropertyExpression)
- Property (EdmMember)
- Name: "Id"
- Right (DbConstantExpression)
- Value: 1
Keep in mind that the value might be a parameter reference instead of a constant and that entities with composite keys would have more complex predicates.
Once you've extracted the entity set name and key information, you can construct an EntityKey and get the state by calling ObjectStateManager.GetObjectStateEntry(key).
Obviously this approach relies on knowledge of how entity framework constructs its command trees and doesn't extend well beyond simple statements. Using DbExpressionVisitor to focus on particularly important structural components of the tree may help.