Linq

What is PLINQ?

PLINQ stands for Parallel Language Integrated Query. It is the parallel implementation of LINQ, in which a query can be executed by using multiple processors. PLINQ ensures the scalability of software on parallel processors in the execution environment. It is used where data grows rapidly, such as in telecom industry or where data is heterogeneous.

PLINQ also supports all the operators of LINQ. In addition, you can query 'collections by using PLINQ. It can also run several LINQ queries simultaneously and makes use of the processors on the system. Apart from this, PLINQ uses parallel execution, which helps in running the queries quickly. Parallel execution provides a major performance improvement to PLINQ over certain types of legacy code, which takes too much time to execute.

What is the DataContext class and how is it related to LINQ?


After you add a LINQ to SQL Classes item to a project and open the O/R Designer, the empty design surface represents an empty DataContext class ready to be configured. The DataContext class is a LINQ to SQL class that acts as a conduit between a SQL Server database and the LINQ to SQL entity classes mapped to that database. This class contains the connection string information and the methods for connecting to a database and manipulating the data in the database. It is configured with connection information provided by the first item that is dragged onto the design surface.

What is the difference between the Take and Skip clauses?


The Take clause returns a specified number of elements. For example, you can use the Take clause to return two values from an array of numbers. The Skip clause skips the specified number of elements in the query and returns the rest. For example, you can use the Skip clause to skip the first four strings in an array of strings and return the remaining array of string.

Which interface implements the standard query operators in LINQ?


The standard query operators implement the IEnumerable or the IQueryable interface in C# and the IEnumerable(Of T) or the IQueryable(Of T) interface in Visual Basic.

What are the different implementations of LINQ?


The different implementations of LINQ are:
LINQ to SQL - Refers to a component of.NET Framework version 3.5 that provides a run-time infrastructure to manage relational data as objects.

LINQ to DataSet - Refers to a component that makes it easier and faster to query over data cached in a DataSet object.

LINQ to XML - Provides an in-memory XML programming interface.

LINQ to Objects - Refers to the use of LINQ queries with any IEnumerable or IEnumerable(T) collection directly, without the use of an intermediate LINQ provider or API, such as LINQ to SQL or LINQ to XML.

Which command-line tool generates code and mapping for the LINQ to SQL component of .NET Framework?


The SqlMetal.exe command-line tool generates code and map the LINQ to SQL component.

Name the control that exposes the LINQ features to Web developers through the ASP.NET data-source control architecture.


The LinqDataSource control exposes the LINQ features to Web developers through the ASP.NET data-source control architecture.

Which extension method do you need to run a parallel query in PLINQ?


The AsParallel extension method is required to run a parallel query in PLINQ.
























No comments:

Post a Comment