Beispiel #1
0
        public void UpdatePassword(string password)
        {
            var @event = new UpdatePasswordEvent
            {
                SourceId = Id,
                Password = password
            };

            ApplyChange(@event);
        }
Beispiel #2
0
 public Task <AsyncTaskResult> HandleAsync(UpdatePasswordEvent evnt)
 {
     return(TryUpdateRecordAsync(conn =>
     {
         var userInfoKey = string.Format(RedisKeyConstants.USERINFO_KEY, evnt.AggregateRootId);
         _cacheManager.Remove(userInfoKey);
         return conn.UpdateAsync(new
         {
             evnt.Password,
             evnt.UpdateBy,
             UpdateTime = evnt.Timestamp
         }, new
         {
             Id = evnt.AggregateRootId,
         }, TableNameConstants.UserInfoTable);
     }));
 }
Beispiel #3
0
 private void Apply(UpdatePasswordEvent @event)
 {
     Password = @event.Password;
 }