I\'m still learning web API, so pardon me if my question sounds stupid.
I have this in my StudentController
:
public HttpResponseMessage
I had this problem in my .NET Framework Web API, because my model existed in a .NET Standard project that referenced a different version of data annotations.
Adding the ReadAsAsync line below highlighted the cause for me:
public async Task Register(RegistrationDetails registrationDetails)
{
var regDetails = await Request.Content.ReadAsAsync();