Skip to main content

Command Palette

Search for a command to run...

Restful in .net core

Published
1 min read

image.png

To return success with no content use

return NoContent();

POST is used to create a resource so if the POST has a ID like POST authors/myid If the id exists it should return Conflict

return new StatusCodeResult(StatusCodes.Status409Conflict)

To create the location URL in the header use

return CreateAtRoute(parametesr);

Patch command https://tools.ietf.org/html/rfc6902