摘要:
.NET Core使用EF时 报错如下信息:The entity type 'XXX' requires a primary key to be defined. If you intended to use a keyless entity type call 'HasNoKey()' 源代码为: 阅读全文
摘要:
.net Core使用EF简单版:一、Nuget导入EF库 二、写实体Model (个人喜欢DBFirst,但是Core里不能直接导入库,所以手写吧) 三、写 DBContxt 四、验证是否成功一:SQLServer/MySQL导入的库 二、实体类 1 using System; 2 using S 阅读全文