Wierd behaviour with LINQ to SQL designer (bug????)

This is odd. Have a test table with an id and name field no primary key was set as it was a quick test hack. Pulled the table into the LINQ Designer and noticed none of the validation partial methods were there. There was no OnnameChanged. Nowhere. After banging my head I made ID a primary key and boom everything decided to appear.

Is this a bug or me being stupid?


Update 20071209

After having thought about this some more I can now see why this might be the case. Without a primary key you cannot Update/Insert/Delete so what would the point in having any of these notifications.

 

Stefan

Published Friday, December 07, 2007 2:56 PM by stefan.sedich

Comments

# re: Wierd behaviour with LINQ to SQL designer (bug????)

Friday, December 07, 2007 7:07 AM by ary

hm, why LINQ does'n use rowid of record like in Oracle?

write to MS Support team about it.

# re: Wierd behaviour with LINQ to SQL designer (bug????)

Friday, December 07, 2007 12:31 PM by Shaurya Anand

yea, i know about this one, encountered

# re: Wierd behaviour with LINQ to SQL designer (bug????)

Friday, December 07, 2007 5:56 PM by stefan.sedich

Yeah took some head banging and for some reason I had the idea to set a primary key and then it appears turn it off and its gone again.

# re: Wierd behaviour with LINQ to SQL designer (bug????)

Friday, December 07, 2007 11:59 PM by Kelvin Li

You might want to read Microsoft's whitebook on dlinq before you call it a bug or being stupid. Basically if you want to use dlinq, there must be a primary key on the table, otherwise dlinq can't determine the object identity.

Leave a Comment

(required) 
(required) 
(optional)
(required)