Here is my Model
public class Country
{
public Guid Id { get; set; }
public string Name { get; set; }
public string Abbreviation { get; set; }
}
Here is my controller
[Route("api/[controller]")]
public class TestController : Controller
{
public TestController()
{
}
[HttpPost]
public IActionResult Create([FromBody] Country country)
{
return StatusCode(500, "");
}
}
When i test my controller through PostMan using following data, why country object is always null. Here is the data i am sending through postman. My break point is hitting that means API is running fine, its just that i am not getting my data there.
I selected "raw" and JSON("application/json") on POSTMAN to send following data
{
"id": "1",
"name": "ddd",
"abbreviation": "ate"
}