Bit of an odd question but is there a way of seeing what objects are attached to my object context. I am getting a few random problems and it would really be helpful to solve them if i could see what's been attached and not yet saved through "SaveChanges".
Answer (Entity Framework) : context.ObjectStateManager.GetObjectStateEntries(EntityState.Added | EntityState.Modified | EntityState.Unchanged).Select(o => o.Entity).OfType<YourObjectType>();