Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Based on LINQ extension methods (C#) Create an Invoice class which includes four properties - a PartNumber ( type int), a PartDescription ( type string),

Based on LINQ extension methods (C#)

image text in transcribed

Create an Invoice class which includes four properties - a PartNumber ( type int), a PartDescription ( type string), a Quantity of item being purchased (type int) and a Pricel type decimal). Use the following sample data for Invoice class objects: Quantity Part Number 87 24 7 77 Part Description Electric Sander Power Saw Sledge Hammer Hammer Lawn Mower Screw Driver Jig saw 18 11 76 Price 57.98 99.99 21.50 1.99 79.50 6.99 11.00 1 39 3 68 56 106 21 Perform the following queries on the array of Invoice objects and display the results: a) Use LINQ to select from each Invoice the PartDescription and value of the Invoice (i.e. Quantity * Price ). Name the calculated column as Invoice Total. Order the results by invoice value in ascending order. [Hint: use let ] b) Part description of the part who has highest quantity. c) Average price of the parts. Create an Invoice class which includes four properties - a PartNumber ( type int), a PartDescription ( type string), a Quantity of item being purchased (type int) and a Pricel type decimal). Use the following sample data for Invoice class objects: Quantity Part Number 87 24 7 77 Part Description Electric Sander Power Saw Sledge Hammer Hammer Lawn Mower Screw Driver Jig saw 18 11 76 Price 57.98 99.99 21.50 1.99 79.50 6.99 11.00 1 39 3 68 56 106 21 Perform the following queries on the array of Invoice objects and display the results: a) Use LINQ to select from each Invoice the PartDescription and value of the Invoice (i.e. Quantity * Price ). Name the calculated column as Invoice Total. Order the results by invoice value in ascending order. [Hint: use let ] b) Part description of the part who has highest quantity. c) Average price of the parts

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago

Question

Discuss about training and development in India?

Answered: 1 week ago

Question

Explain the various techniques of training and development.

Answered: 1 week ago

Question

Explain the various techniques of Management Development.

Answered: 1 week ago

Question

Develop a program for effectively managing diversity. page 303

Answered: 1 week ago

Question

List the common methods used in selecting human resources. page 239

Answered: 1 week ago