我正在试验 .net 核心、实体框架和 sqlserver,我认为hierarchyID 是我想要建模的完美数据类型。但是当我搭建数据库时,EFC 无法映射层次结构。
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 …Run Code Online (Sandbox Code Playgroud)