I have a simple model as that has 2 fields and with the following put method, i'm tring to update it in the db. Everymethod including delete works, however put method always returns a 405 error in Postman. (tried WebDAV solutions as well.) What am I missing here?
PUT METHOD:
{
"MasterId":1,
"MasterName":"Test"
}
Action
[HttpPut("{id:int}")]
public async Task<IActionResult> PutMaster(int id, Master master)
{
if (id != master.MasterId)
{
return BadRequest();
}
//...some code
return NoContent();
}