Exemplo n.º 1
0
     public bool Equals(LandmarkCategory other)
     {
         if (ReferenceEquals(null, other)) return false;
         if (ReferenceEquals(this, other)) return true;
 		if (other.Id == 0 && Id == 0)
 			return false;
 		else
 			return other.Id == Id;
     }
Exemplo n.º 2
0
     private void FixupCategory(LandmarkCategory previousValue)
     {
         if (IsDeserializing)
         {
             return;
         }
 
         if (Category != null)
         {
             CategoryId = Category.Id;
         }
 
         if (ChangeTracker.ChangeTrackingEnabled)
         {
             if (ChangeTracker.OriginalValues.ContainsKey("Category")
                 && (ChangeTracker.OriginalValues["Category"] == Category))
             {
                 ChangeTracker.OriginalValues.Remove("Category");
             }
             else
             {
                 ChangeTracker.RecordOriginalValue("Category", previousValue);
             }
             if (Category != null && !Category.ChangeTracker.ChangeTrackingEnabled)
             {
                 Category.StartTracking();
             }
         }
     }