コード例 #1
0
        public async Task <IActionResult> Put(int id, [FromBody] CrewDTO modelDTO)
        {
            if (modelDTO == null)
            {
                ModelState.AddModelError("", "Ticket structure is wrong!!!");
                return(BadRequest(ModelState));
            }

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            await service.Update(id, modelDTO);

            return(Ok(modelDTO));
        }
コード例 #2
0
 public CrewDto Put(int id, [FromBody] CrewDto entity)
 {
     return(_crewsSrvice.Update(entity));
 }