public JsonResult Delete(int id) { try { return(Json(serviceAdicional.Delete(id))); } catch (Exception ex) { return(Json(new { Erro = ex.Message + " " + ex.InnerException })); } }
public JsonResult Delete([FromBody] Adicional objeto) { try { return(Json(serviceAdicional.Delete(objeto.id))); } catch (Exception ex) { return(Json(new { Erro = ex.Message + " " + ex.InnerException })); } }