本文介绍了JOliver EventStore-如何访问所有存储的事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何访问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-如何访问所有存储的事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 17:07