public async Task <IActionResult> Delete(int customerId, int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = await _provider.DeleteTransaction(id); if (!result.Value) { return(NotFound()); } if (result == null) { return(StatusCode(500, "A problem occurred while handling your request.")); } return(NoContent()); }