How can I convert the query from SQL to LINQ?

XML to Dictionary through LINQ?

  • Hello, I'm trying make a dictionary pairing from 3 things in an XML file. The first item and key of the dictionary is a string, the value is a decimal which will be the result of a price element times a quantity element. Here is my LINQ query thus far... Dictionary<string, decimal> total = (from myfile in file.Descendants("invoice") let key = Convert.ToDecimal(myfile.Element("quanti… * Convert.ToDecimal(myfile.Element("price"… orderby Convert.ToDecimal(myfile.Element("quanti… * Convert.ToDecimal(myfile.Element("price"… select key).ToDictionary<string, decimal>(file.Element("partDesc").Value)… Can anyone help me? I have googled this over and over, and I have not been able to find anything that demonstrates anything close to what I'm trying to do. Thanks for any help!

  • Answer:

wmcgee35... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.