English 中文(简体)
分发《阿拉伯联合行动》版本及其共同开展的活动
原标题:Dispatching AR version together with its event in JO s CommonDomain

I m 寻找正确途径,将我的Aggregate目前版本传达给《阅读模式》。 目前我看到的唯一可能性是:

public class Child : AggregateBase
{
    ...

    public void ChangeName(string firstName, string lastName)
    {
        RaiseEvent(new ChildNameChanged(Id, Version + 1, firstName, lastName));
    }

    ...
}

我不喜欢这样说,因为我认为Aggregate应当自动向所有阅读的旁听器发送AR版本。

我是否可以采取其他办法?

最佳回答
问题回答

暂无回答




相关问题
How to "join" two Aggregate Roots when preparing View Model?

Assume that Book and Author are Aggregate Roots in my model. In read model i have table AuthorsAndBooks which is a list of Authors and Books joined by Book.AuthorId When BookAdded event is fired i ...

Event Sourcing and dictionary objects

How event sourcing can be combined with several types of dictionary objects like Country, Region, Time Zone etc. and dictionary types from particular domain model like Budget or Availability ...

Event Sourcing and Read Model generation

Assuming Stack Overflow domain problem and the following definition of events: UserRegistered(UserId, Name, Email) UserNameChanged(UserId, Name) QuestionAsked(UserId, QuestionId, Title, Question) ...

Inter-Aggregate Communication in CQRS + DDD + Event Sourcing

How should separate aggregate roots (AR) communicate with one another in an environment built on DDD principles using an event-sourced aggregate back-end? For instance, I have a Facility aggregate ...

热门标签