Just remove `_entityIdentity` and it still passes all tests
TODO: if this attempt incurs no other problems, then the T4 templates and sample apps must also be cleaned up
Merge pull request #14 from edi0177/develop

Fixed TrackableExtensions.GetChanges() does not return modified Items if more than one ITrackable Members available.

Turns out, that hasLocalDownstreamChanges for Childs is overridden if more than one ITrackable members are available or modified ITrackable is not the last.
Only happens in the 1-1 and M-1 path.
Added Test and TestModelClass
Slightly improve readability and test coverage
See how it fails on read-only/calculated properties
Only update property if writeable, so we can use readonly (calculated) properties

Somewhat simpler than https://github.com/tonysneed/trackable-entities/pull/13
Interface INavigationPropertyInspector allows to override the default mechanism of inspecting the entity navigation properties (entity references and entity collections)

All occurrences of PropertyInfo.GetValue have been encapsulated in the DefaultNavigationPropertyInspector class. PropertyInfo.GetValue should no longer be directly used throughout the library, otherwise it may provoke unwanted effects if the property getters are non-trivial (e.g. implement lazy loading). Applications are also encouraged to switch to the new syntax:

foreach (var navProp in entity.GetNavigationProperties())
{
    // 1-1 and M-1 properties
    foreach (var refProp in navProp.AsReferenceProperty())
        DoSomething(refProp.EntityReference);

    // 1-M and M-M properties
    foreach (var colProp in navProp.AsCollectionProperty())
        DoSomething(colProp.EntityCollection);
}

Advantages over the standard "loop-all-properties-GetValue-and-cast" technique
1. PropertyInfo.GetValue is unfriendly to lazy loading, whilst the custom implementation of the INavigationPropertyInspector interface has chance to terminate visitation of the uninitialized navigation properties
2. Easier to debug the "for-loops". No need to tap F10 like mad to skip the non-navigation properties when you are only interested in visiting nav props
3. More narrow scope for 'refProp' and 'colProp' variables == safer code
4. Elegant casting syntax, e.g. entity.GetNavigationProperties().OfCollectionType<IList>() returns collection navigation properties of type IList
Json serializer must skip navigation properties with null values
Merge branch 'azabluda-nav-prop-inspector' into develop
Merge branch 'remove_entityIdentity' of https://github.com/azabluda/TrackableEntitiesContrib into azabluda-remove_entityIdentity
Merge branch 'azabluda-remove_entityIdentity' into develop
Added failing test: Apply_Changes_Should_Mark_Unchanged_Order_Unchanged_Customer_With_Multiple_Addresses_Added.  DbContext.ApplyChanges throws the following exception:

Attaching an entity of type 'TrackableEntities.EF.Tests.NorthwindModels.CustomerAddress' failed because another entity of the same type already has the same primary key value. This can happen when using the 'Attach' method or setting the state of an entity to 'Unchanged' or 'Modified' if any entities in the graph have conflicting key values. This may be because some entities are new and have not yet received database-generated key values. In this case use the 'Add' method or the 'Added' entity state to track the graph and then set the state of non-new entities to 'Unchanged' or 'Modified' as appropriate.
Fixed: Allowed recursion into a section of code by adding line 144 to DbContextExtensions.ApplyChanges.