问题描述
如何访问EventStore中的所有存储事件以重建读取的模型?
How can I access all stored events in the EventStore to rebuild my read models?
在问题 J Oliver EventStore V2.0问题中提到了称为GetFrom
的方法,但是在Wireup返回的"IStoreEvents"接口上找不到该方法.
A method called GetFrom
is mentioned at question J Oliver EventStore V2.0 questions, but I cannot find this method on the interface "IStoreEvents" which is returned from Wireup.
推荐答案
该方法是IPersistStreams
接口而不是IStoreEvents
接口的一部分.需要对API进行一些微调以适应这种情况.我刚刚在IStoreEvents
中添加了一个名为GetFrom(DateTime started)
的方法,该方法返回IEnumerable<Commit>
:
That method is a part of the IPersistStreams
interface and not the IStoreEvents
interface. The API needs to be refined slightly to accommodate that. I have just added a method to IStoreEvents
called GetFrom(DateTime started)
that returns IEnumerable<Commit>
:
https://github.com/joliver/EventStore/commit/1a039073df20fba11562c3c1a872180c225122c9c
这篇关于JOliver EventStore-如何访问所有存储的事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!