public virtual void UpdateDateTimeRange(DateTime start, DateTime end) { if (end > start) { TimeRange = new DateTimeRange(start, end); var eventUpdatedEvent = new EventUpdatedEvent(this); DomainEvents.Raise(eventUpdatedEvent); } }
public virtual void UpdateMaximumNumberOfVisitors(int newMaximum) { if (newMaximum == MaximumNumberOfVisitors) { return; } MaximumNumberOfVisitors = newMaximum; var eventUpdatedEvent = new EventUpdatedEvent(this); DomainEvents.Raise(eventUpdatedEvent); }