예제 #1
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))));
        }
예제 #2
0
        public ActionResult <AlertaResponse> Salvar([FromBody] AlertaRequest alertaRequest)
        {
            Alerta alerta = _mapperRequest.Map <Alerta>(alertaRequest);

            return(Ok(_mapperResponse.Map <AlertaResponse>(AlertaService.Salvar(alerta))));
        }