Linq Qb

  • Uploaded by: Sreenivasarao
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Linq Qb as PDF for free.

More details

  • Words: 260
  • Pages: 3
1. Assembly which provides functionality for using LINQ with relational databases (LINQ to SQL) [Topic: LINQ] a. System.Core.dll b. System.Data.Linq.dll c. System.Xml.Linq.dll d. System.Data.SqlClient.dll 2. Refer the below mentioned code snippet and identify the correct output [Topic: LINQ] class Program { static void Main() { string[] currentVideoGames={“Morrowind”,”BioShock”,”Half Life2: Episode 1”, “A Dark”, “Daxter”, “System Shock 2”}; IEnumerable<string> subset=from g in currentVideoGames where g.Length>6 orderby g select g;

foreach(string s in subset) { Console.WriteLine(“Item: {0}”,s); } } } a. Item: Morrowind Item: BioShock Item: Half Life2: Episode 1 Item: System Shock 2

b. Item: BioShock

Item: Half Life2: Episode 1 Item: Morrowind Item: System Shock 2

c. Item: BioShock Item: Half Life2: Episode 1 Item: System Shock 2

d. Item: BioShock Item: Morrowind Item: Half Life2: Episode 1 Item: System Shock 2

3. Refer the below mentioned code snippet class Program { static void Main() { string[] currentVideoGames={“Morrowind”,”BioShock”,”Half Life2: Episode 1”, “A Dark”, “Daxter”, “System Shock 2”}; var subset=from g in currentVideoGames where g.Length>6 orderby g select g;

foreach(string s in subset) { Console.WriteLine(“Item: {0}”,s); } }

} 4. Identify the correct query expression using extension methods for bolded statement in above given code snipped [Topic: LINQ] a. var subset= currentVideoGames.Where(game=>game.Length>6).OrderBy(game=>game).Select(gam e=>game); b. var subset= currentVideoGames.Where(game=>game.Length>6). Select(game=>game); c. var subset= currentVideoGames.Where(game=>game.Length>6).OrderBy(game=>game). d. var subset= currentVideoGames.Where(game=>game.Length>6). Select(game=>game). OrderBy(game=>game); 5. Which query operators are used to define the backbone for any LINQ expression, which allows you to extract a subset of data from a fitting container [Topic: LINQ] a. join, on, equals, into b. group, by c. from, in d. orderby, ascending, descending

Related Documents

Linq Qb
May 2020 10
Linq
October 2019 16
Linq
August 2019 26
Jun-linq
June 2020 42
Introducing Linq
May 2020 7

More Documents from "Sreenivasarao"