Пример #1
0
 /// <summary>
 /// 处理 更新地区事件
 /// </summary>
 /// <param name="evnt"></param>
 /// <returns></returns>
 public Task <AsyncTaskResult> HandleAsync(UserRegionUpdatedEvent evnt)
 {
     return(TryUpdateRecordAsync(connection =>
     {
         return connection.UpdateAsync(new
         {
             Region = evnt.Region,
             Version = evnt.Version,
             EventSequence = evnt.Sequence
         }, new
         {
             Id = evnt.AggregateRootId,
             //Version = evnt.Version - 1
         }, ConfigSettings.UserTable);
     }));
 }
Пример #2
0
 private void Handle(UserRegionUpdatedEvent evnt)
 {
     _info.Region = evnt.Region;
 }