/// <summary> /// Logs the domain event specified /// </summary> /// <param name="event">The domain event</param> public void LogEvent ( IDomainEvent @event ) { Validate.IsNotNull(@event); var log = DomainEventLog.CreateLog ( @event ); _logRepository.AddLog(log); _dbContext.SaveChanges(); }
public Result LogEvent(IDomainEvent @event) { var log = DomainEventLog.CreateLog(@event); return(_logRepository.AddLog(log).Tap(() => _dbContext.SaveChanges())); }