LINQ Interview Questions and Answers Part 5

By
1.) What are the types of LINQ Providers?                                                                            
There are some types of LINQ Providers as given below:-
  • LINQ  to SQL
  • LINQ to Objects
  • LINQ to Data sets
  • LINQ to XML
  • LINQ to Entities
2.) Can we use 'having' clause in LINQ like sql?                                                                  
Yes.

3.) What is extension of file,when we use LINQ to SQL?                                                 
.dbml  extension

4.) Why do we use string in LINQ?                                                                                           
LINQ is used to query and transform strings and collections of strings.It is useful with semi-structure data in the text file.
5.) Why do we use Reflection concepts in LINQ?                                                                
The .NET Framework class library uses the concepts of reflection to examine the meta data in the .NET assembly and create collections of types and members.The System.Reflection namespace is used to use Reflection in LINQ.

6.) What is the concepts of PLINQ query?                                                                             
A Simple PLINQ query works on a large collection of data.The effect of PLINQ is not visible.
More Details...

7.) What is ZIP Operator?                                                                                                             
The ZIP operators helps in combing two collections into one .It was introduced in LINQ in ASP.NET 4.0. It uses the Zip() method to merge the two sequences which are identical in length into one.
Syntax:-
Public static Parallelquery <PResult>zip
<TFirst,TSecond,PResult>( this parallelquery<TFirst>First,
this parallelquery <TSecond>Second,func<TFirst,TSecond,PResult>ResultSelector)

8.) What is the use of file Directories in LINQ?                                                                   
  • It use the file directory feature to find all the files that have a specified file name extension.
  • It retrieve the total number of bytes used by all the files in a specified folders and its sub folder.
  • It use the file info object to retrieve the size of the largest file.
  • it perform advance grouping and sorting operations on a folder and list of files.

9.) What is LINQ to ADO.NET ?                                                                                                
LINQ to ADO.NET helps you to query on any ado.net object using LINQ programming model.It consists of two separate technologies.
  1. LINQ to Dataset
  2. LINQ to SQL
10.) What is LINQ to XML ?                                                                                                       
LINQ to XML is a new way to write and read xml data in .NET Framework .The system.xml.Linq namespace is used for LINQ to XML.
There are some advantage to use LINQ to XML.
  • It helps to Load xml from files or stream.
  • It serialize the xml to files and stream.
  • It is helpful to control in-memory xml tree.
  • It validate the XML tree using XML Schema Definition (XSD).

0 comments:

Post a comment

Powered by Blogger.