AggregateRoot.cs has a major bug where there's a ThreadStatic collection being initialised at declaration. ThreadStatic variables must never be initialised in such a manner as it will result in only the first instance getting initialized. Instances for other threads will see their corresponding instances uninitialised.
This commit fixes the issue and has a corresponding unit test to prove it.
AggregateRoot.cs has a major bug where there's a ThreadStatic collection being initialised at declaration. ThreadStatic variables must never be initialised in such a manner as it will result in only the first instance getting initialized. Instances for other threads will see their corresponding instances uninitialised.
This commit fixes the issue and has a corresponding unit test to prove it.