title: How to manually configure the database type for a property in EF Core?
body: <p>I have a class:</p>
  
  <pre><code>class Order
  {
      public OrderId Id {get;set;}
  }
  
  struct OrderId
  {
      private int readonly id;
  
      public OrderId(int id)
      {
          this.id = id;
      }
  }
  </code></pre>
  
  <p>For some reason, I don't want to use a primitive type for the property.
  When I'm trying to save object of this class to <code>Sql Server</code> through <code>Entity Framework Core</code>, I get an error:</p>
  
  <blockquote>
    <p>System.InvalidOperationException: 'The property 'Order.Id' is of type 'OrderId' which is not supported by current database provider. Either change the property CLR type or manually configure the database type for it.'</p>
  </blockquote>
  
  <p>Question: Is it possible to configure mapping in such a case and how to do it?</p>