Weird Select/Delete query generation in Linq2SQL?

This sounds like a bug somewhere in Linq2Sql. I think the extra parameters shouldn't be generated I think you should file a bug at Microsoft Connect on this.

This sounds like a bug somewhere in Linq2Sql. I think the extra parameters shouldn't be generated. I think you should file a bug at Microsoft Connect on this.

I'm doing DB refactoring into L2S inheritence, to cut down on needless tables. – leppie Mar 25 '09 at 11:09.

The problem as I see it is that LINQ-to-SQL does all this behind the scenes via DeleteOnSubmit; you give it an object instance (Customer, etc) - not values. – Marc Gravell? Mar 25 '09 at 11:02 @p1 is an enum derived from byte.So single value.

– leppie Mar 25 '09 at 11:07 1 Does the list of "random values" by any chance represent all the possible values of that enum? – BlueMonkMN Mar 26 '09 at 3:14.

To check, open the DBML file, click on the TagId property of the Tag class and view the properties.

1 Yes, it is, else it would not work at all :) – leppie May 5 '09 at 6:58.

Please delete the dbml file from the project, restart the visual studio and reconstruct the dbml file. Some times the visual studio caches the old versions of your sql table or stored procedures schema. This might help linq to process sql correctly.

1 Nope, the issue has nothing do with SQL itself. These are derived classes using a discriminator property. – leppie May 5 '09 at 6:59.

Since the source for the . NET Framework is finally available this is quite easy to achieve :) Link: Configuring Visual Studio to Debug . NET Framework Source Code.

Sadly, code is not available for System.Data. Linq :( – leppie May 13 '09 at 12:02 Strange.. it loads the symbols for that DLL but as you're saying I can't manage to jump into the source. – VVS May 13 '09 at 13:59.

Now this does not affect the query/behaviour in any way, I am just interested in whats going on here. Tag is a base class for Linq2SQL inheritence. It seems the extra parameters are the integer values of the discriminator (Type) of all the inherited types.

If I remove inherited types, the extra parameters goes down. I have noticed this happens for SELECT's too. Just to note.

I am using an enum for the discriminator, as per the MS examples.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions