I have a C# object MyObject
with a HashSet
property. I serialise it client-side, and then send it via GET
with parameters in the URI to a C# ApiController
, which accepts the object as an argument:
public MyOtherObject Get([FromUri] MyObject obj) { ... }
This all worked absolutely fine using a List
, but now that I'm using a HashSet
, the client serialises and sends the object, but the server receives an empty HashSet
.
Is there a key difference in the way that C#'s ApiController
receives HashSets
and Lists
via URI?