CodeFirst自定义字段蛇形名称报错 返回
SqlSugar
沟通中
4
107
悬赏:0 飞吻

propertyInfo提示是menu表的Children字段,然后我是加了忽略了的


然后报错是因为DbCloumnName是null

热忱回答(4)
-
fate sta VIP0
2周前
自个看一下这个行代码为什么报错。
0 回复 -
fate sta VIP0
2周前是不是空引用了。
0 回复 -
@fate sta:对的,空引用了加了[SugarColumn(IsIgnore = true)]就会出现在这,DbCloumnName 是 null
我取消了Children的忽略Codefirst成功建表
我又带着好奇新建了个字段添加忽略依然报这个错,需要我在写个判空吗


0 回复 -
fate sta VIP0
2周前加个If就行了ignore不转换。
0 回复