public Task <AsyncTaskResult> HandleAsync(UserGiftRemarkChangedEvent evnt)
 {
     return(TryTransactionAsync(async(connection, transaction) =>
     {
         var effectedRows = await connection.UpdateAsync(new
         {
             Version = evnt.Version,
             EventSequence = evnt.Sequence
         }, new
         {
             Id = evnt.AggregateRootId,
             //Version = evnt.Version - 1
         }, ConfigSettings.UserTable, transaction);
         if (effectedRows == 1)
         {
             await connection.UpdateAsync(new
             {
                 Remark = evnt.Remark
             }, new
             {
                 UserId = evnt.AggregateRootId,
                 Id = evnt.UserGiftId
             }, ConfigSettings.UserGiftTable, transaction);
         }
     }));
 }
Пример #2
0
 private void Handle(UserGiftRemarkChangedEvent evnt)
 {
 }
Пример #3
0
 private void Handle(UserGiftRemarkChangedEvent evnt)
 {
     _userGifts.Single(x => x.Id == evnt.UserGiftId).Remark = evnt.Remark;
 }