ODataJsonSerializer

I am having a problem with the ODataJsonSerializer not serializing any child objects in order to pass to the controller. However, if I use Newtonsoft's json serializer, everything works fine (except that it is not in an OData format). I hope that someone can help me out.

Here is the serialization method:

public async Task<HttpResponseMessage> UpdateQuery(int queryId = default(int), Lightwave.Data.Query query = default(Lightwave.Data.Query))
        {
            var uri = new Uri(_baseUri, $"Queries({queryId})");
            var httpRequestMessage = new HttpRequestMessage(HttpMethod.Patch, uri);
            var jsonOption = new JsonSerializerOptions();
            jsonOption.Converters.Add(new JsonStringEnumConverter());
            var content = Radzen.ODataJsonSerializer.Serialize(query, jsonOption);
            httpRequestMessage.Content = new StringContent(content, Encoding.UTF8, "application/json");

            OnUpdateQuery(httpRequestMessage);

            return await _httpClient.SendAsync(httpRequestMessage);
        }

Here are the classes I'm trying to serialize:

[Table(nameof(Query))]
    public partial class Query
    {
        public Query() 
        { 
            QueryParameters = new List<QueryParameter>();
            UserQueries = new List<UserQuery>();
        }
        [Key]
        [Required]
        public int QueryId { get; set; }

        [Required]
        public string QueryName { get; set; }

        [Required]
        public string Sql { get; set; }

        [Required]
        public int ConnectionId { get; set; }

        public bool Active
        {
            get;
            set;
        } = true;

        [Required]
        public int FolderId { get; set; }

        public string? LastModifiedUser { get; set; }

        public DateTime? LastModifiedDate { get; set; }

        public virtual Connection Connection { get; set; }

        public virtual Folder Folder { get; set; }

        public ICollection<QueryParameter> QueryParameters { get; set; }

        public ICollection<UserQuery>? UserQueries { get; set; }

    }

[Table("QueryParameter", Schema = "dbo")]
    public partial class QueryParameter
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int QueryParameterId { get; set; }

        [Required]
        public int QueryId { get; set; }

        [Required]
        public string ParameterName { get; set; }

        [Required]
        public QueryParameterType ParameterType { get; set; }

        [Required]
        
        public QueryParameterDataType DataType { get; set; }

        [Required]
        public string Label { get; set; }

        public int? DynamicParameterId { get; set; }

        public bool Required { get; set; }

        public string DefaultValue { get; set; }

        public short DisplayOrder { get; set; }

        public DynamicParameter DynamicParameter { get; set; }

        public Query Query { get; set; }
        [NotMapped]
        [JsonIgnore]
        public string ParameterTypeValueString
        {
            get
            {
                return ((short)ParameterType).ToString();
            }
            set
            {
                ParameterType = Enum.Parse<QueryParameterType>(value);
            }
        }
        [NotMapped]
        [JsonIgnore]
        public string DataTypeValueString
        {
            get
            {
                return ((short)DataType).ToString();
            }
            set
            {
                DataType = Enum.Parse<QueryParameterDataType>(value);
            }
        }

    }

Has anyone else had this problem? If so, any help would be greatly appreciated. This is happening throughout my application when any object has child objects associated with it.

Thank you in advance!

This exactly how ODataJsonSerializer works:

ODataController cannot parse any complex sub object and that's why it's removed explicitly.