Skip to content

Commit

Permalink
Fixed exception when adding an item to a InMemoryContext when it alre…
Browse files Browse the repository at this point in the history
…ady exists

Happens after a trade.
  • Loading branch information
sven-n committed Sep 7, 2024
1 parent 9c5cfab commit de61e91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Persistence/InMemory/MemoryRepository{TValue}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class MemoryRepository<TValue> : IRepository<TValue>, IMemoryRepository
/// <param name="obj">The item.</param>
public void Add(Guid key, TValue obj)
{
this._values.Add(key, obj);
this._values.TryAdd(key, obj);
this._createdObjects.Add(key);
}

Expand Down

0 comments on commit de61e91

Please sign in to comment.