Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventServiceMappedByConvention #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

EventServiceMappedByConvention #81

wants to merge 1 commit into from

Conversation

ProAvia
Copy link

@ProAvia ProAvia commented Oct 19, 2011

This service has been added to allow publishing events without the need of an Aggregate Root. For instance if a pure CRUD bounded context has no need of a domain model but wants to notify the remaining application of changes as they occur.

Use this service by subclassing, e.g.:

public class MyCrudContextEventSource : EventPublisherMappedByConvention
{
protected void OnMyItemCreated(MyItemCreated evnt) { }
protected void OnMyItemUpdated(MyItemUpdated evnt) { }
protected void OnMyItemDeleted(MyItemDeleted evnt) { }
// etc.
}

An event can then be published like this:

var evnt = new MyItemUpdated {
....
};
new MyCrudContextEventSource().Raise(evnt);

Questions? Contact me at:

Twitter: @dtraub
Mail: dennis.traub@gmail.com

By the way, I appreciate your great work! This framework has been a lot of help.

Cheers,

Dennis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants