Automatically mapping datatable to objects
posted by orca(820) 4 years, 5 months ago 0
The DataTable is not the point of the article. The DataTable is simply used a simple means of creating my database structure - I couldn't do that using a DataReader. You could easily use a DataReader, but as mentioned, the point of this article is how to map an object to a datarow/datareader, not whether to use a DataTable or a DataReader.
Reply
Dual Monitors for Developers
posted by orca(820) 4 years, 4 months ago 0
Two is a beginning, but you really do need three for optimum efficiency :) Three's good, four is too much: http://improve.dk/blog/2006/11/29/multi-monitoring-with-style
XmlDocument fluent interface
posted by orca(820) 4 years, 3 months ago 0
Ralph, I won't go ahead and say that this is a universal replacement for XmlWriter. XmlWriter definitely has it's merits, for instance if you're doing some large document XML handling. That being said, if you're not doing that, then maintanability and readability ought always be your primary concern, and imho, the XmlOutput method is a lot more readable. Correct, not everyone will know the XmlOutput class, but most will find it easy to understand nonetheless. Furthermore, if we make it a requirement for everyone to know everything, why are we not writing x86 asm, after all that's somewhat easier to memorize than the .NET framework :) And regarding the LINQ bit (which isn't actually LINQ, just a 3.5 feature, but everybody, including me, somehow manages to call it LINQ), I really despise the nestedness of it, the way any XML document creation will end with an ugly amount of closing paranthesises. And finally, as I also mentioned on the blog, using XmlWriter inhibits you from accessing the underlying XmlDocument if needed.