예제 #1
0
        public IActionResult Put(int id, [FromBody] PlaneDTO planeDTO)
        {
            planeDTO.Id = id;

            try
            {
                planeService.UpdateEntity(id, planeDTO);
            }
            catch (ValidationException e)
            {
                return(BadRequest(new { Exception = e.Message }));
            }

            return(Ok(planeService.GetEntity(id)));
        }