title: Net core dapper insert model inside model error: the member cannot be used as a parameter value
body: <p>Below, I have my main model MyModel.</p>
  <p>Options is a property of type Options.</p>
  <p>In PostGres Options is a jsonb column.</p>
  <pre><code>public class MyModel
  {
      public string Id { get; set; }
      public Options Options { get; set; } = new Options();
  }
  </code></pre>
  <p>Options model:</p>
  <pre><code>public class Options
  {
      public string Test { get; set; }
  }
  </code></pre>
  <p>Using Dapper I insert like this:</p>
  <pre><code>public async Task Create(MyModel model)
  {
  string sql = &quot;insert into MyModel (id, options) values (@id, @options)&quot;
  ....
  </code></pre>
  <p>I get this error:</p>
  <p>&quot;The member Options of type MyApp.Models.Api.Options cannot be used as a parameter value&quot;</p>
  <p>How does Dapper know about the options model I am sending in?
  Should I be serialising Options before sending to Dapper?</p>
  <p>I cannot find many examples of this kind of thing where there's a model inside a model.</p>