Esempio n. 1
0
        //更新密钥
        public async Task <HandleResult> Patch(string id)
        {
            var command = new UpdateSafeKey(id);
            var result  = await ExecuteCommandAsync(command);

            if (result.IsSuccess())
            {
                return(HandleResult.FromSuccess("密钥已更新"));
            }
            return(HandleResult.FromFail(result.GetErrorMessage()));
        }
Esempio n. 2
0
 /// <summary>更新密钥
 /// </summary>
 public void Handle(ICommandContext context, UpdateSafeKey command)
 {
     context.Get <AppSystem>(command.AggregateRootId).UpdateSafeKey(command.SafeKey);
 }