protected NoContentResult SuccessWithOutData()
{
return this.NoContent();
}
protected CreatedAtActionResult SuccessAndNoData()
{
return ? ; // What do I return here?
}
For 201 result what do I have to return here?
CodePudding user response:
return Ok(string);
is what I use
CodePudding user response:
You could check the Microsoft.AspNetCore.Mvc.ControllerBase class and you would find all the methods to retrun response
And you could check this document to learn the difference between responses: