We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ebbac7 commit f8cddc0Copy full SHA for f8cddc0
src/NHibernate/Engine/StatefulPersistenceContext.cs
@@ -443,10 +443,7 @@ public bool ContainsEntity(EntityKey key)
443
/// </summary>
444
public object RemoveEntity(EntityKey key)
445
{
446
- if (!entitiesByKey.Remove(key, out var tempObject))
447
- throw new KeyNotFoundException(key.ToString());
448
-
449
- object entity = tempObject;
+ entitiesByKey.Remove(key, out var entity);
450
List<EntityUniqueKey> toRemove = new List<EntityUniqueKey>();
451
foreach (KeyValuePair<EntityUniqueKey, object> pair in entitiesByUniqueKey)
452
0 commit comments