Hello, I have a json complex property that is being translated to json with
ToJson()
ToJson()
, some of the properties of the complex property can be null. Now, I want those nullable properties when they are null, not to be written to the json representation. I already tried to use
JsonIgnoreAttribute
JsonIgnoreAttribute
with
Condition = JsonIgnoreCondition.WhenWritingNull
Condition = JsonIgnoreCondition.WhenWritingNull
but EF Core ignores them for some reason.
Is there a special attribute that I can use or Fluent API for this behavior?