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);
 }
Пример #3
0
 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 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");
     }
 }
Пример #5
0
 public Task <AsyncTaskResult> HandleAsync(NoteTitleChanged evnt)
 {
     _logger.InfoFormat("Note denormalizered, title:{0}, Version: {1}", evnt.Title, evnt.Version);
     return(Task.FromResult(AsyncTaskResult.Success));
 }
Пример #6
0
 public Task HandleAsync(NoteTitleChanged evnt)
 {
     _logger.InfoFormat("Note title changed, title:{0}, Version: {1}", evnt.Title, evnt.Version);
     return(Task.CompletedTask);
 }
Пример #7
0
 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));
 }
Пример #8
0
 public void Handle(NoteTitleChanged evnt)
 {
     Console.WriteLine("Note title changed, title:{0}", evnt.Title);
 }