コード例 #1
0
        /// <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();
        }
コード例 #2
0
        public Result LogEvent(IDomainEvent @event)
        {
            var log = DomainEventLog.CreateLog(@event);

            return(_logRepository.AddLog(log).Tap(() => _dbContext.SaveChanges()));
        }