Option 1: If I deserialize my JSON request manually, I get a correct result:
[Route("search")]
[HttpPost]
public IEnumerable<ErrorLogDto> Search(HttpRequestMessage request)
{
string res = request.Content.ReadAsStringAsync().Result;
LogSearchDto dto = JsonConvert.DeserializeObject(res, typeof(LogSearchDto)) as LogSearchDto;
//dto = not null
Option 2: If I use this, I always get NULL value for dto:
[Route("search")]
[HttpPost]
public IEnumerable<ErrorLogDto> Search([FromBody]LogSearchDto dto)
{
// dto = null!
I am out of ideas how to debug this..