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 }; }
public async Task <IActionResult> Put([FromBody] UpdateBankAccount command) { await DispatchAsync(command); return(Ok()); }