public IHttpActionResult Remover([FromBody] PersonagensTO personagensTO) { BaseResponse bResp = new BaseResponse(); try { Personagens.Remover(personagensTO.Id); } catch (RpgException nex) { bResp.Status = (int)nex.Codigo; } catch (Exception ex) { bResp.Status = -1; bResp.Detalhes = ex.Message; } return(Ok(bResp)); }
// DELETE: api/personagens/5 public IHttpActionResult Delete(int id) { BaseResponse bResp = new BaseResponse(); try { Personagens.Remover(id); } catch (RpgException nex) { bResp.Status = (int)nex.Codigo; } catch (Exception ex) { bResp.Status = -1; bResp.Detalhes = ex.Message; } return(Ok(bResp)); }