Hi I have the following route in my web api:
[Route("Resource/")]
[HttpGet]
public IActionResult Get([FromQuery] IEnumerable<string> filterItems = null)
{
}
In .Net Framework 4.8, whenever I would call this without specifying any filterItems
it would default the IEnumerable
to null
which is the behaviour I'm looking for.
After migrating to .Net Core 3.1, I now get an empty list instead.
Anyone know how I can default the nullable list to null (= null
works with any other type, but lists seem problematic)?