diff --git a/src/Microsoft.AspNet.OData.Shared/Formatter/Serialization/ODataResourceSerializer.cs b/src/Microsoft.AspNet.OData.Shared/Formatter/Serialization/ODataResourceSerializer.cs index d8f2d80709..c286c5f986 100644 --- a/src/Microsoft.AspNet.OData.Shared/Formatter/Serialization/ODataResourceSerializer.cs +++ b/src/Microsoft.AspNet.OData.Shared/Formatter/Serialization/ODataResourceSerializer.cs @@ -1743,9 +1743,9 @@ private IEnumerable> GetPro { if (changedProperties == null || changedProperties.Contains(complexProperty.Key.Name)) { - IEdmTypeReference type = complexProperty.Key == null ? null : complexProperty.Key.Type; + IEdmTypeReference type = complexProperty.Key?.Type; - if (type != null && resourceContext.EdmModel != null) + if (type != null && type.IsStructured() && resourceContext.EdmModel != null) { Type clrType = EdmLibHelpers.GetClrType(type.AsStructured(), resourceContext.EdmModel);