title: EF Core and Pomelo 5.0 - how to query the json column
body: <p>I'm using last version of json implementation in Pomelo 5.0 and configure my maria server to use microsoft json serialisation.</p>
  <pre><code>  var serverVersion = new MariaDbServerVersion(new Version(10, 3, 0));
  
      services.AddDbContext&lt;BusinessManagementDbContext&gt;(options =&gt;
      {
        options.UseMySql(databaseConfiguration.ConnectionString, serverVersion, m =&gt;
       {
         m.UseMicrosoftJson(MySqlCommonJsonChangeTrackingOptions.FullHierarchyOptimizedSemantically);
         m.EnableRetryOnFailure();
       });
        
        options.EnableSensitiveDataLogging(true);
      });
  </code></pre>
  <p>I can save my POCO in my db but when I try to query my data, I get a null object.
  Here's my data :
  <a href="https://i.stack.imgur.com/9j1S2.png" rel="nofollow noreferrer">HeidySQL data</a></p>
  <p>My query is pretty simple but I think I'm not using the right way for json query.</p>
  <pre><code>await Context.ValidatedSaleInvoices.AsNoTracking().FirstOrDefaultAsync(x =&gt; x.Id == id);
  </code></pre>
  <p>It seems like there is no deserialization between my data and my property &quot;Content&quot;.</p>
  <p>How can I do this ?</p>
  <p>Thank you,</p>
  <p><em><strong>Edit</strong></em></p>
  <p>My model is :</p>
  <pre><code>     public class ValidateSaleInvoiceEntity
    {
      public int Id { get; set; }
  
      public ValidateSaleInvoiceContent Content { get; set; }
    }
  
    public class ValidateSaleInvoiceContent
    {
      public string BusinessName { get; set; }
  
      public DateTime Date { get; internal set; }
  
      public string Number { get; internal set; }
  
      public Address Address { get; internal set; }
  
      public List&lt;ValidateSaleInvoiceLineEntity&gt; Lines { get; internal set; } = new List&lt;ValidateSaleInvoiceLineEntity&gt;();
    }
  
    public class ValidateSaleInvoiceLineEntity
    {
      public string Description { get; internal set; }
  
      public decimal Quantity { get; internal set; } 
  
      public decimal UnitPriceVatExcluded { get; internal set; } 
  
      public decimal VatRate { get; internal set; }
    }
  </code></pre>
  <p>And my json Result was like this (empty, like there waere no deserialisation: { &quot;BusinessName&quot;:&quot;&quot;, &quot;Date&quot;:&quot;&quot;, &quot;Number&quot;:&quot;&quot; etc.}</p>
  <p>My boss stop my poc about MariaDB Json implementation so I had to go back to this good old friend pure sql column :/ . That's why I haven&quot;t a full json result. Sorry</p>