开发者

Entity Framework Nullable Types not included in the CreateXXX Method

开发者 https://www.devze.com 2023-02-16 08:01 出处:网络
I\'m using Entity Framework 4.0.I have tables with many nullable types. For a table XYZ the Entity Framework creates an object with an insert method named CreateXYZ, but this method only includes the

I'm using Entity Framework 4.0. I have tables with many nullable types. For a table XYZ the Entity Framework creates an object with an insert method named CreateXYZ, but this method only includes the parameters for non-nullable database fields. Nullable fields can the开发者_运维技巧refore not be set on the initial insert.

What is the best way to create an CreateXYZ method that can take the nullable types as well?


The nullable values are not included in the CreatedXYZ. You can assign them later.

0

精彩评论

暂无评论...
验证码 换一张
取 消