public IActionResult Put(int id, [FromBody] DemoDTO demo) { if (id != demo.Id) { return(BadRequest()); } return(NoContent()); }
public ActionResult <DemoDTO> Post([FromBody] DemoDTO demo) { return(CreatedAtAction(nameof(Get), new { id = demo.Id }, demo)); }