小编Red*_*Red的帖子

实体框架核心脚手架“找不到数据类型为‘hierarchyid’的列的类型映射。跳过列”

我正在试验 .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)

.net sql-server entity-framework scaffolding hierarchyid

3
推荐指数
2
解决办法
2686
查看次数