together they rock for all kinds of back and forth to get a linq query to work right or to see how to get from sql to linq
and to debug what sometimes goes wrong in them.
linqer sometimes makes poor choises about how to handle some types so i do re-work it a bit. it may use a Convert method when it gets stuck on a few things... but it does get the basics of transforming a sql join and group into valid linq syntax.
just check it with linqpad and tweak the bad bits.... bam!
Hey thanks for the reply. I tried what you wrote and the compiler complains "Range variable name cannot match the name of a member of the 'Object' class." and it underlines the ToString() piece.
edit: Put parens around r.BottleCode.ToString() and it worked. Thanks!
You can also use ConvertAll<Type>(...) to convert a collection from one type to another. I find myself using this a lot in .net 3.5 when I have a list of <T> and T implements interface I, and I need a list of <I>.
I anxiously await .net 4.0
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.