I saw on Bob's blog that some parameter items are going to be fixed in .net 4.0
http://www.sqlskills.com/BLOGS/BOBB/post/L2S-and-EF-parameterization-problem-will-be-fixed-in-NET-40-completely.aspxI noticed that if trying to pass parameters from C# to a stored proc using
SqlCommandBuilder.DeriveParameters any parameters for Geography (probably Geometry as well) do not get assigned a known UdtTypeName. The parameters are thought to be of type varbinary.
The workaround is to explicity set UdtTypeName like this
_cmd.Parameters["@Geog"].UdtTypeName = "GEOGRAPHY";It would be great if this were also fixed in .net 4. If anyone has the environment to verify this, please post your findings.