-
Notifications
You must be signed in to change notification settings - Fork 2
Reading Events
Tomas Lycken edited this page Oct 30, 2017
·
1 revision
You can fetch events using the IEventStream
interface:
var events = eventStore.Events(streamId);
However, often you won't want all events from a stream for performance reasons. There is therefore also an overload that takes a projection from IQueryable<TEventMetadata>
to IQueryable<TEventMetadata>
, which lets you filter further:
var events = eventStore.Events(streamId, es => es.Where(e => e.Timestamp > lastKnownEvent));
The TEventMetadata
is your metadata interface, i.e. IEventMetadata<TStreamId>
in the default implementations.