diff --git a/src/JKang.EventSourcing.Persistence.DynamoDB/DynamoDBEventStore.cs b/src/JKang.EventSourcing.Persistence.DynamoDB/DynamoDBEventStore.cs index 35060db..c749ef0 100644 --- a/src/JKang.EventSourcing.Persistence.DynamoDB/DynamoDBEventStore.cs +++ b/src/JKang.EventSourcing.Persistence.DynamoDB/DynamoDBEventStore.cs @@ -68,8 +68,7 @@ public async Task[]> GetEventsAsync( int maxVersion, CancellationToken cancellationToken = default) { - var filter = new QueryFilter("aggregateVersion", QueryOperator.GreaterThanOrEqual, minVersion); - filter.AddCondition("aggregateVersion", QueryOperator.LessThanOrEqual, maxVersion); + var filter = new QueryFilter("aggregateVersion", QueryOperator.Between, minVersion, maxVersion); Search search = this._table.Query(aggregateId as dynamic, filter); var events = new List>();