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