I get the following error when I have an entity with a nullable collection:
System.ArgumentException occurred
_HResult=-2147024809
_message=The argument must be of type 'IEnumerable'.
HResult=-2147024809
IsTransient=false
Message=The argument must be of type 'IEnumerable'.
Parameter name: graph
Source=System.Web.Http.OData
ParamName=graph
StackTrace:
at System.Web.Http.OData.Formatter.Serialization.ODataCollectionSerializer.CreateODataValue(Object graph, IEdmTypeReference expectedType, ODataSerializerContext writeContext)
InnerException:
If it's an empty list, the error is not thrown. I would expect a better error message when the collection is null, since that error does not provide any insight as to what is the root cause of the problem.
Comments: Fixed in changeset 1f6743aa6d6c6ce306019b7e0658424a910b33ad
System.ArgumentException occurred
_HResult=-2147024809
_message=The argument must be of type 'IEnumerable'.
HResult=-2147024809
IsTransient=false
Message=The argument must be of type 'IEnumerable'.
Parameter name: graph
Source=System.Web.Http.OData
ParamName=graph
StackTrace:
at System.Web.Http.OData.Formatter.Serialization.ODataCollectionSerializer.CreateODataValue(Object graph, IEdmTypeReference expectedType, ODataSerializerContext writeContext)
InnerException:
If it's an empty list, the error is not thrown. I would expect a better error message when the collection is null, since that error does not provide any insight as to what is the root cause of the problem.
Comments: Fixed in changeset 1f6743aa6d6c6ce306019b7e0658424a910b33ad