Which of the following code will retrieve all products in the Beverages category sorted by product name?
A.
B.
I
C.
D. All of the mentioned
A.
Code:
Enumerable<Product> beverages = from p in db.Products
where p.Category.CategoryName == "Beverages"
orderby p.ProductName
select p;
I
Code:
Enumerable<Product> beverages = from p in db.Products
where p.Category.CategoryName == "Beverages"
orderby p.ProductName
select p;
Code:
IEnumerable<Product> beverages = from p in db.Products
where p.Category.CategoryName = "Beverages"
orderby p.ProductName
select p;