开发者

Entity Framework insert error ("The Version field is required.")

开发者 https://www.devze.com 2022-12-31 16:59 出处:网络
I am using Silverlight 4 and RIA services. When I try to insert into my database, I get the following error:

I am using Silverlight 4 and RIA services. When I try to insert into my database, I get the following error:

"Submit operation failed validation. Please inspect Entity.ValidationErrors for each entity in EntitiesInError for more information."

Upon inspecting the ValidationErrors, I see:

"The Version field is required."

Isn't the Version field开发者_如何学Go updated and maintained by the framework? If so, why is it null? If not, how am I supposed to set it?


This is apparently a bug with in Silverlight 4. Hopefully it will be fixed in the final release.

It can be fixed by simply setting [Entity].Version = new byte[0];.

0

精彩评论

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