public ActionResult DeletarAlerta(int id) { return(Ok(AlertaService.Deletar(id))); }
public ActionResult <AlertaResponse> Editar(int id, [FromBody] AlertaRequest alertaRequest) { Alerta alerta = _mapperRequest.Map <Alerta>(alertaRequest); return(Ok(_mapperResponse.Map <AlertaResponse>(AlertaService.Editar(id, alerta)))); }
public ActionResult <AlertaResponse> Obter(int id) { return(Ok(_mapperResponse.Map <AlertaResponse>(AlertaService.Obter(id)))); }
public ActionResult <AlertaResponse> Salvar([FromBody] AlertaRequest alertaRequest) { Alerta alerta = _mapperRequest.Map <Alerta>(alertaRequest); return(Ok(_mapperResponse.Map <AlertaResponse>(AlertaService.Salvar(alerta)))); }
public IActionResult Listar() { return(Ok(_mapperResponse.Map <List <AlertaResponse> >(AlertaService.Listar()))); }