Xml Columns
Based on the Linqpad Challenge I now use LinqPad to do all my adhoc sql queries. However I hit a wall in a lot of places where we have xml columns in our tables.
In a number of places we have empty strings instead of null values in these columns. However this renders linqpad useless as if any of these values are returned in my query. I am met with a simple:
In a number of places we have empty strings instead of null values in these columns. However this renders linqpad useless as if any of these values are returned in my query. I am met with a simple:
Is there any way around this? Anyway to have linqpad treat all xml fields as strings for example?
XmlException
Root element is missing.
Comments
It is relying on a nuget package to make the generated code a little cleaner, but that's not required for functionality
added options to control camelizing and fixing of ID to Id on column names http://share.linqpad.net/xxnani.linq
I'd rather incorporate a fix to make it work properly, though. This means hacking around the bug in LINQ to SQL. I'm working on something, check out the next beta.
Thanks a ton btw!
...where x.Response != null...
which includes the blank records as well as the null ones. To make this work as you'd like, I'd have to instruct LINQ to SQL to modify the SQL that it generates and I don't think this can be done.
To hook it in requires some nasty hacks - open LINQPad in ILSpy and take a look at DataContextBase.Init and SubmitChanges.