public void Add(StoredEvent storedEvent) { _databaseContext.StoredEvents.Add(storedEvent); }
public void Update(StoredEvent storedEvent) { _databaseContext.Entry(storedEvent).State = System.Data.Entity.EntityState.Modified; }
public void Handle(DomainEvent domainEvent) { var serializedBody = _eventSerializer.Serialize(domainEvent); var storedEvent = new StoredEvent(domainEvent.GetType().ToString(), domainEvent.OcurrendOn, serializedBody); _storedEventRepository.Add(storedEvent); }