title: Entity Framework Core Scaffolding "Could not find type mapping for column with data type 'hierarchyid'. Skipping column"
body: <p>I'm experimenting with .net core, entity framework and sqlserver, i thought the hierarchyID is a perfect datatype for what i'm trying to model. But when i scaffolded the database, EFC was not able to map the hierarchy.</p>
  
  <pre><code>Could not find type mapping for column 'dbo.ingredient.hierarchy_id' with data type 'hierarchyid'. Skipping column.
  Could not scaffold the primary key for 'dbo.ingredient'. The following columns in the primary key could not be scaffolded: hierarchy_id.
  Unable to generate entity type for table 'dbo.ingredient'.
  Could not find type mapping for column 'dbo.ingredient_location.ingredient_id' with data type 'hierarchyid'. Skipping column.
  Could not find type mapping for column 'dbo.locations.location' with data type 'geography'. Skipping column.
  Could not find type mapping for column 'dbo.pantry_ingredient.ingredient_id' with data type 'hierarchyid'. Skipping column.
  </code></pre>
  
  <p>Should I drop the idea to use that data type or there is a work around?</p>
  
  <p>I looked for some solutions but all of them require to write the scaffolding by hand and i'm not confident enough at the moment to do so</p>