I have Asp.Net WebApi 2 project, Now converted into Asp.Net Core 2.0
HttpGet method with array property not able to bind model.
the model comes null in Asp.net Core 2.0 (using swagger to test)
Any changes required?
public class Customer
{
public string name { get; set; }
public new string[] systemId { get; set; }
}
CustomerController.cs
[HttpGet]
public IActionResult RetrieveData(Customer filters)
{
// code
In Asp.net WebApi2 It was working properly, but in Asp.net Core values are not able to bind, values are null.
If change it to [HttpPost] it will work fine but why not with [HttpGet] as working like ASP.Net WebApi2.