开发者

StoreGeneratedPattern in Entity framework

If the storage model has the StoreGeneratedPattern=identity attribute set, why should not the conceptual model reflect开发者_如何学编程 this in some way? Either in and attribute or in a readonly nature of a property? If i need to pass a value to the reference field.


We have released a hotfix for the StoreGeneratedPattern issue. Try it out!

MSConnect: http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=37957

Code Gallery: http://archive.msdn.microsoft.com/KB2561001


It should. And it does when it is working correctly. What you are probably seeing is a result of a bug in the designer.

When you set that property in the designer in VS2010 RTM, it only adds an annotation tag in the CSDL and does not add anything in the SSDL, so it doesn't treat it as read-only. Amazingly the same or very similar bug existed in EF 1.0!

If you edit the SSDL section by hand, it will work as advertised in the documentation. You just have to re-do, or merge your changes when you regenerate your model.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜