Yes, there is a way. ObjectContextThe instance offers a property called ObjectStateManger. ObjectStateManagermanages all attached objects and knows its state:
ObjectStateEntry entry = context.ObjectStateManager.GetObjectStateEntry(attachedEntity);
EntityState state = entry.State;
If you need to get all the modified or added objects that you can use:
var entities = context.ObjectStateManager
.GetObjectStateEntries(EntityState.Added | EntitiSate.Modified)
.Select(e => e.Entity);
OfType - . SaveChanges, , .