コード例 #1
0
 private void RemoveMappedTempIds(UniqueIdMap idMap)
 {
     foreach (UniqueId uniqueId in idMap.Keys)
     {
         TempIds.Remove(uniqueId);
     }
 }
コード例 #2
0
        internal void MarkTempIdAsMapped(EntityAspect aspect, bool isMapped)
        {
            var keyProperties = aspect.EntityType.KeyProperties;

            foreach (var aProperty in keyProperties)
            {
                UniqueId aUniqueId = new UniqueId(aProperty, aspect.GetValue(aProperty.Name));
                if (isMapped)
                {
                    TempIds.Remove(aUniqueId);
                }
                else
                {
                    if (KeyGenerator == null)
                    {
                        return;
                    }
                    if (KeyGenerator.IsTempId(aUniqueId))
                    {
                        TempIds.Add(aUniqueId);
                    }
                }
            }
        }