I am 开发者_如何学Goworking with Entity Framework 4.0 (VS 2010 Beta 2, NOT RC). I can model the EDM and produce the required database. When I ask VS to generate the code for the model, it generates the expected .designer.cs file. When I look at the factory methods for each entity that the designer has generated, I've noticed that it doesn't include all of the properties of the entity.
Is it correct to say that the factory method only includes properties that cannot be null ? This appears to be the case, but I'm not entirely sure.
Thanks,
Scott
That's exactly the case, all non-nullable properties are parameters for the factory method. All nullable properties are not
You can pass 0 as the primary key parameter
精彩评论