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