Use linq to select the partdescription and quantity and


Question: Use the class Invoice provided in the ex09_03 folder with this chapter's examples to create an array of Invoice objects. Use the sample data shown in Class Invoice includes four properties-a PartNumber (type int), a PartDescription (type string), a Quantity of the item being purchased (type int) and a Price (type decimal). Perform the subsequent queries on the array of Invoice objects and display the results:

1) Use LINQ to select the PartDescription and Quantity and sort the results by Quantity.

2) Use LINQ to select from each Invoice the PartDescription and the value of the Invoice (i.e., Quantity * Price). Name the calculated column InvoiceTotal. Order the results by Invoice value. [Hint: Use let to store the result of Quantity * Price in a new range variable total.]

3) Using the results of the LINQ query in Part d, select the InvoiceTotals in the range

Please show me all the work and provide me the answer.

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: Use linq to select the partdescription and quantity and
Reference No:- TGS0944351

Expected delivery within 24 Hours