//更新密钥 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())); }
/// <summary>更新密钥 /// </summary> public void Handle(ICommandContext context, UpdateSafeKey command) { context.Get <AppSystem>(command.AggregateRootId).UpdateSafeKey(command.SafeKey); }