コード例 #1
0
 // DELETE api/deposit/5
 public IHttpActionResult Delete(int id)
 {
     try
     {
         _depositService.Delete(id);
         return(Ok());
     }
     catch (BankClientException ex)
     {
         return(BadRequest(ex.Message));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
コード例 #2
0
 public async Task DeleteDeposit(Deposit deposit)
 {
     await _depositService.Delete(deposit);
 }
コード例 #3
0
        public ActionResult Delete(Guid id, FormCollection collection)
        {
            _depositService.Delete(id);

            return(RedirectToAction("Index", new DepositListFiltersModel().GetRouteValues()).WithSuccess("Depósito Eliminado"));
        }
コード例 #4
0
        public async Task <IActionResult> Delete(int id)
        {
            await _depoService.Delete(id);

            return(RedirectToAction("Index"));
        }