public async Task <IActionResult> Delete(string accountId) { if (!string.IsNullOrEmpty(accountId)) { if (await accountRepository.DeleteAccountAsync(accountId)) { return(StatusCode(202)); } else { return(StatusCode(500, "Cannot delete account.")); } } else { return(StatusCode(400, "No account id supplied.")); } }
public async Task DeleteAccountAsync(long accountId) { await _accountsRepository.DeleteAccountAsync(accountId); }