public void Handle(NoteTitleChanged evnt) { var note = _session.CreateCriteria<NoteEntity>().Add(Expression.Eq("Id", evnt.Id)).UniqueResult<NoteEntity>(); note.Title = evnt.Title; note.UpdatedTime = evnt.UpdatedTime; _session.Update(note); }
public void Handle(NoteTitleChanged evnt) { _connection.Update( new { Title = evnt.Title, UpdatedTime = evnt.UpdatedTime }, new { Id = evnt.Id }, "EventSourcing_Sample_Note", _transaction); }
public void Handle(NoteTitleChanged evnt) { using (var connection = _connectionFactory.OpenConnection()) { connection.Update( new { Title = evnt.Title, UpdatedTime = evnt.UpdatedTime }, new { Id = evnt.Id }, "EventSourcing_Sample_Note"); } }
public Task <AsyncTaskResult> HandleAsync(NoteTitleChanged evnt) { _logger.InfoFormat("Note denormalizered, title:{0}, Version: {1}", evnt.Title, evnt.Version); return(Task.FromResult(AsyncTaskResult.Success)); }
public Task HandleAsync(NoteTitleChanged evnt) { _logger.InfoFormat("Note title changed, title:{0}, Version: {1}", evnt.Title, evnt.Version); return(Task.CompletedTask); }
public Task <AsyncTaskResult> HandleAsync(NoteTitleChanged evnt) { _logger.InfoFormat("Note Updated, Id:{0}, Title:{1}, Version: {2}", evnt.AggregateRootId, evnt.Title, evnt.Version); return(Task.FromResult(AsyncTaskResult.Success)); }
public void Handle(NoteTitleChanged evnt) { Console.WriteLine("Note title changed, title:{0}", evnt.Title); }