Skip to content

Commit

Permalink
Merge pull request #66 from andypelzer/master
Browse files Browse the repository at this point in the history
Fix unit tests (issue #65)
  • Loading branch information
Andreas Pelzer committed Jun 11, 2014
2 parents c029f27 + c13d375 commit 56a67a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GraphDiff/GraphDiff/Internal/Graph/GraphNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ protected static void AttachRequiredNavigationProperties(DbContext context, obje
var entityType = ObjectContext.GetObjectType(updating.GetType());
foreach (var navigationProperty in context.GetRequiredNavigationPropertiesForType(updating.GetType()))
{
var navigationPropertyInfo = entityType.GetProperty(navigationProperty.Name, BindingFlags.Instance | BindingFlags.NonPublic);
var associatedEntity = navigationPropertyInfo.GetValue(updating, null);
var navigationPropertyInfo = entityType.GetProperty(navigationProperty.Name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);

var associatedEntity = navigationPropertyInfo.GetValue(updating, null);
if (associatedEntity != null)
{
associatedEntity = FindEntityByKey(context, associatedEntity);
Expand Down Expand Up @@ -224,7 +224,7 @@ private static void EnsureConcurrency<T>(IObjectContextAdapter db, T entity1, T
var conceptualType = metadata.GetItems<EntityType>(DataSpace.CSpace).Single(p => p.FullName == cTypeName);
var concurrencyProperties = conceptualType.Members
.Where(member => member.TypeUsage.Facets.Any(facet => facet.Name == "ConcurrencyMode" && (ConcurrencyMode)facet.Value == ConcurrencyMode.Fixed))
.Select(member => entityType.GetProperty(member.Name, BindingFlags.Instance | BindingFlags.NonPublic))
.Select(member => entityType.GetProperty(member.Name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public))
.ToList();

// Check if concurrency properties are equal
Expand Down

0 comments on commit 56a67a3

Please sign in to comment.