Geeks With Blogs
Bob's Occasionally* Sane Thoughts *Never
Today I got the following error when working with the Linq to Sql dbml file:

"System.InvalidOperationException: Incorrect AutoSync specification for member 'xxxxx'."

The problem involved the primary key "NationId" in the following image:



When you right-click on NationId and select properties, you see this in the Properties window:



The problem is that the auto-sync property should be "OnInsert" instead of "Always".  However, I have not figured out how to make "OnInsert" the default when the view/table is dropped on the designer.  If anyone knows the answer to this please leave a comment, because as it stands now I will have to change this property every time I rebuild my dbml file. Posted on Thursday, October 22, 2009 5:39 PM Linq to Sql | Back to top


Comments on this post: Linq to Sql ORM Designer - System.InvalidOperationException: Incorrect AutoSync specification for member 'XXXX'.

# re: Linq to Sql ORM Designer - System.InvalidOperationException: Incorrect AutoSync specification for member 'XXXX'.
Requesting Gravatar...
hmmm, can you use partial classes to do this?
Left by Bill on Dec 28, 2009 9:34 AM

Comments have been closed on this topic.
Copyright © robertbunn | Powered by: GeeksWithBlogs.net | Join free