コード例 #1
0
        public UpdateBankAccountResponse Put(UpdateBankAccount request)
        {
            var account = Repository.Find(request.AccountId);

            if (account == null)
            {
                throw HttpError.NotFound(string.Format("Bank account {0} not found", request.AccountId));
            }

            account.PopulateWith(request);
            Repository.Save();

            return new UpdateBankAccountResponse { Success = true };
        }
コード例 #2
0
        public async Task <IActionResult> Put([FromBody] UpdateBankAccount command)
        {
            await DispatchAsync(command);

            return(Ok());
        }