public IActionResult AirplaneEdit([FromBody] AirplaneViewModel model)
        {
            if (!ModelState.IsValid)
            {
                NotificarErroModelInvalida();
                return(Response(model));
            }

            _airplaneService.Editar(_mapper.Map <AirplaneModel>(model));

            return(Response());
        }
Exemple #2
0
        public int EditarAirPlane(int id, [FromBody] Airplane airplane)
        {
            if (airplane != null)
            {
                _airplaneService.Editar(airplane);

                return(1);
            }
            else
            {
                return(-1);
            }
        }