示例#1
0
 public ActionResult DeletarAlerta(int id)
 {
     return(Ok(AlertaService.Deletar(id)));
 }
示例#2
0
        public ActionResult <AlertaResponse> Editar(int id, [FromBody] AlertaRequest alertaRequest)
        {
            Alerta alerta = _mapperRequest.Map <Alerta>(alertaRequest);

            return(Ok(_mapperResponse.Map <AlertaResponse>(AlertaService.Editar(id, alerta))));
        }
示例#3
0
 public ActionResult <AlertaResponse> Obter(int id)
 {
     return(Ok(_mapperResponse.Map <AlertaResponse>(AlertaService.Obter(id))));
 }
示例#4
0
        public ActionResult <AlertaResponse> Salvar([FromBody] AlertaRequest alertaRequest)
        {
            Alerta alerta = _mapperRequest.Map <Alerta>(alertaRequest);

            return(Ok(_mapperResponse.Map <AlertaResponse>(AlertaService.Salvar(alerta))));
        }
示例#5
0
 public IActionResult Listar()
 {
     return(Ok(_mapperResponse.Map <List <AlertaResponse> >(AlertaService.Listar())));
 }