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.
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