Closed xavierjohn closed 6 years ago
If the Event Store is empty, the following bold line throws.
private void InitializeEventStoreCatchupGoals() { using (var eventStore = createEventStoreDbContext()) { eventStoreTotalCount = eventStore.Events.Where(matchEvents, filter).Count(); initialCatchupIsDoneAfterEventId = eventStore.Events.Max(e => e.Id); } }
{"The cast to value type 'System.Int64' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type."}
If the Event Store is empty, the following bold line throws.
private void InitializeEventStoreCatchupGoals() { using (var eventStore = createEventStoreDbContext()) { eventStoreTotalCount = eventStore.Events.Where(matchEvents, filter).Count(); initialCatchupIsDoneAfterEventId = eventStore.Events.Max(e => e.Id); } }
{"The cast to value type 'System.Int64' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type."}