Example #1
0
 public static bool IsConceptualNullKeyChanged(EntityKey conceptualNullKey, EntityKey realKey)
 {
     if (realKey == (EntityKey)null)
     {
         return(true);
     }
     return(!EntityKey.InternalEquals(conceptualNullKey, realKey, false));
 }
Example #2
0
        /// <summary>
        /// Checks if the Real Key represents different FK values
        /// than those present when the Conceptual Null was created
        /// </summary>
        /// <param name="conceptualNullKey">The key representing the Conceptual Null</param>
        /// <param name="realKey">The key to be checked</param>
        /// <returns>True if the values are different, false otherwise</returns>
        public static bool IsConceptualNullKeyChanged(EntityKey conceptualNullKey, EntityKey realKey)
        {
            Debug.Assert(IsConceptualNullKey(conceptualNullKey), "The key supplied is not a null key");

            if (realKey == null)
            {
                return(true);
            }

            return(!EntityKey.InternalEquals(conceptualNullKey, realKey, compareEntitySets: false));
        }