コード例 #1
0
        public IActionResult AirplaneEdit([FromBody] AirplaneViewModel model)
        {
            if (!ModelState.IsValid)
            {
                NotificarErroModelInvalida();
                return(Response(model));
            }

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

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

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