i.e. a "save" SP has an optional, defaulted parameter:
"@Batch_Size int = NULL OUTPUT"
adding the function to the dbml correctly configures this as:
"ref Nullable<int> batch_Size"
however, if you use the dbml designer to customize the update behavior, and don't specify anything for this mapping (since there is no suitable candidate column), then the generated code for the mapping uses:
as the value, which isn't "ref", so breaks at compile time (along with an overload method match failure).
In this (unmapped but ref) case, should it instead be doing:
I can't fix in the .cs, since it will regenerate itself if I blink too hard. The only other fix is to add a partial class which re-declares the method but changing "ref int? batchSize" to "int? batchSize" - but it feels like the tool should worry about this, not me...
Simple; under some circumstances (steps listed), the tool outputs C# code that simply does not compile, because it fails to correctly use a "ref" parameter on the code that was generated by the same tool. No user changes needed to the code to make it fail - just the auto-generated code itself.
Sunday, October 28, 2007 9:58 AM
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.