title: How to map Syncfusion Blazor QueryBuilder rules from C# class
body: <p>I am trying to implement the Syncfusion Blazor QueryBuilder component to build dynamic search filters.<br />
  I can successfully store query builder rules to my DB after mapping to my C# class model.
  But when I try to re-map these rules back to the Syncfusion &quot;RuleModel&quot; class I get error below in the browser.
  It appears to be caused by the dynamic property types on the &quot;Operate&quot; and &quot;Value&quot; fields.<br />
  When I get the error, these properties have the &quot;ValueKind&quot; element. When this is not present, it works fine (eg. If I manually create a new RuleModel())</p>
  <p>Error in Browser, when QueryBuilderObj.SetRules() method is called..</p>
  <pre><code>Error: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot implicitly convert type 'System.Text.Json.JsonElement' to 'string'
     at CallSite.Target(Closure , CallSite , Object )
     at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
     at Syncfusion.Blazor.QueryBuilder.Internal.QueryBuilderRules`1.SetField()
     at Syncfusion.Blazor.QueryBuilder.Internal.QueryBuilderRules`1.OnParametersSetAsync()
     at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)   
  </code></pre>
  <p>Client Code</p>
  <pre><code>
  &lt;SfQueryBuilder TValue=&quot;@FilterColumns&quot; @ref=&quot;QueryBuilderObj&quot; MaxGroupCount=3&gt;
      &lt;QueryBuilderColumns&gt;
         &lt;QueryBuilderColumn Field=&quot;Status&quot; Label=&quot;Status&quot; Type=&quot;ColumnType.String&quot;&gt;&lt;/QueryBuilderColumn&gt;
         &lt;QueryBuilderColumn Field=&quot;DepartmentCode&quot; Label=&quot;DepartmentCode&quot; Type=&quot;ColumnType.String&quot;&gt;&lt;/QueryBuilderColumn&gt;
      &lt;/QueryBuilderColumns&gt;
  &lt;/SfQueryBuilder&gt;
  &lt;button type=&quot;button&quot; @onclick=&quot;getRules&quot;&gt;Get Rules&lt;/button&gt;
  
  @code {
      SfQueryBuilder&lt;FilterColumns&gt; QueryBuilderObj;
  
      public class FilterColumns
      {
          public string Status { get; set; }
          public string DepartmentCode { get; set; }
      }
  
      [Parameter]
      public RuleModel rules { get; set; }
  
      private void getRules()
      {
          QueryBuilderObj.SetRules(rules.Rules, rules.Condition);
      }
  
  }
  </code></pre>
  <p>Syncfusion RuleModel Class</p>
  <pre><code>public class RuleModel
  {
          public RuleModel();
  
          public string Condition { get; set; }
          public string Field { get; set; }
          public string Label { get; set; }
          public bool? Not { get; set; }
          public dynamic Operator { get; set; }
          public string Type { get; set; }
          public dynamic Value { get; set; }
          public List&lt;RuleModel&gt; Rules { get; set; }
  }
  </code></pre>
  <p>I have replicated the syncfusion RuleModel class exactly as above in my domain model.</p>
  <p>Has anyone successfully stored and retrieved QueryBuilder rules from Blazor UI into a C# model/class?</p>
  <p>Thanks.</p>