コード例 #1
0
 public JsonResult Delete(int id)
 {
     try
     {
         return(Json(serviceAdicional.Delete(id)));
     }
     catch (Exception ex)
     {
         return(Json(new { Erro = ex.Message + " " + ex.InnerException }));
     }
 }
コード例 #2
0
 public JsonResult Delete([FromBody] Adicional objeto)
 {
     try
     {
         return(Json(serviceAdicional.Delete(objeto.id)));
     }
     catch (Exception ex)
     {
         return(Json(new { Erro = ex.Message + " " + ex.InnerException }));
     }
 }