AggregateRoot not Loading when publishing command #960
-
Hello, I am sure I am doing something wrong but I cannot for the life of me get my AggregateRoot object to load from the event store when publishing a new command by hand. EX.
The Entity loads in fine but when the command handler triggers the aggregate root is marked as new and no data was loaded into state. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Ok. I solved this. I wrote a custom EventStore provider for CosmosDB which appeared to be working as expected and in fact was with the exception of one small thing.
My code was checking for events whose x.Version was > fromEventSequenceNumber instead of >=. Once I followed it all the way through and I saw that the id's were correct but the events were not being returned in that lookup I saw that it is counting from 1 and my first event version number is 1 so it was never returning it. This problem had me stuck for far too long! |
Beta Was this translation helpful? Give feedback.
Ok. I solved this. I wrote a custom EventStore provider for CosmosDB which appeared to be working as expected and in fact was with the exception of one small thing.