public IActionResult Post([FromBody] JsonFormVal value) { if (!ModelState.IsValid) { //throw new System.InvalidOperationException("잘못된 값"); return(BadRequest(ModelState)); //400 BadRequest } value.Id++; // 데이터 저장 , return(CreatedAtAction("Get", new { id = value.Id }, value)); }
public void Put(int id, [FromBody] JsonFormVal value) { }