title: EF Core 5: FreeText Failed to convert parameter value from a String to a Byte[] on a Full-Text indexed Byte[] column
body: <p>I have the following entity with a property <code>Content</code> of type <code>byte[]</code>:</p>
  <pre class="lang-cs prettyprint-override"><code>public class Post
  {
    [Column(TypeName = &quot;varbinary(max)&quot;)]
    [Required]
    public byte[] Content { get; set; }
    
    public string ContentType { get; set; }
  }
  </code></pre>
  <p>and the content type in model builder:</p>
  <pre><code>modelBuilder.Entity&lt;Post&gt;()
      .Property(p =&gt; p.ContentType)
      .HasComputedColumnSql(&quot;'.html'&quot;);
  </code></pre>
  <p>The Migration:</p>
  <pre class="lang-cs prettyprint-override"><code>migrationBuilder.Sql(&quot;CREATE FULLTEXT CATALOG ft_catalog AS DEFAULT&quot;, true);
  migrationBuilder.Sql(@&quot;CREATE FULLTEXT INDEX ON dbo.Posts([Content] TYPE COLUMN ContentType) KEY INDEX PK_Posts&quot;, true);
  </code></pre>
  <p><code>EF.Functions.FreeText</code> takes a string <code>propertyReference</code> and a string <code>freeText</code>.</p>
  <p>Here, I passed the Column &quot;Content&quot; as a string I got <code>The expression passed to the 'propertyReference' parameter of the 'FreeText' method is not a valid reference to a property. The expression should represent a reference to a full-text indexed property on the object referenced in the from clause</code>.</p>
  <pre class="lang-cs prettyprint-override"><code>IQueryable&lt;DataSets.Post&gt; query = db.Posts;
  
  query = query.Where(k =&gt; EF.Functions.FreeText(&quot;Content&quot;, model.keyword)); 
  </code></pre>
  <p>Then, I looked around and found <code>EF.Property</code> and used it on <code>propertyReference</code> param, Then I got <code>Failed to convert parameter value from a String to a Byte[]</code>.</p>
  <pre class="lang-cs prettyprint-override"><code>query = query.Where(k =&gt; EF.Functions.FreeText(EF.Property&lt;string&gt;(k, &quot;Content&quot;), model.keyword));
  </code></pre>
  <p>The following SQL query works perfectly against the database:</p>
  <pre class="lang-sql prettyprint-override"><code>select ID,Title,Description from Posts where FREETEXT(Content,'wolf')
  </code></pre>