If one changes an entity inside a collection one can test to see if the collection contains dirty records using the ContainsDirtyContents method.
If one has used the addnew method on an entity collection, how does one determine that there are new records waiting to be inserted?
There isn't a ContainsNewContent method. I did a quick test and did an addnew on an entity collection but it did not change it's dirty status.
How do you find out that there are pending inserts.
This is important in that before a user closes the application or does something else you might want to prompt them if they want to save any changes made? Updates are fine. Inserts are another question.
For AddNew() I have found a reference to a 'flag'. Howe do I gain access to this flag?
Deletes arn't a problem as one can use a RemovedEntitiesTracker and simply count the number of entities present in the deleted entities collection.
See this test code used for testing purposes only
public bool ChangesInEffect()
{
recentMessages.AddNew();
bool x = (deletedMessages.Count > 0);
bool y = recentMessages.ContainsDirtyContents; // not true after addnew()
return x || y;
}