On any change to a dbml via the graphical interface (add a table/stored proc) every reference to System.Int32
gets changed to System.[Integer]
(square brackets included) causing hundreds of errors.
This is manifest everywhere in this dbml designer.vb such as:
Public Property ArghID() As System.[Integer]
Public Function PleaseHelpDetails(.... <Global.System.Data.Linq.Mapping.ParameterAttribute(Name:="WhyWhyWhyID", DbType:="Int")> ByVal WhyWhyWhyID As System.[Integer], ...
Private _AnnoyanceID As System.[Integer]
Partial Private Sub OnHauntedDbmlIDChanging(value As System.[Integer])
I can find no references to this. Can anyone speculate as to the cause?
A search and replace fixes this, but it is a complete nuisance.
Update: Having Tried the classic "delete the appropriate "*AppData\Local\Temp\Temporary ASP.NET Files* folders" trick - with no luck. Took a look at the SVN history of the file - and some IDs were set up as bytes(!) - and those were changed to integers at some point, manually. I am looking for some inconsistency with this - but can't find anything yet.
So there it is - search and replace had search and destroyed the dbml.
The definition of the table columns were set up like this in the dbml file:
<Column Name="WellObviouslyID" Type="System.Integer" DbType="Int NOT NULL" CanBeNull="false" />
instead of
<Column Name="WellObviouslyID" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
and forced their integrity on the other occurrences in the .designer page.
It was a poor choice in replacing strings that led to this. As ever, avoidable by doing things via the gui. Trying to save time is always perilous.