A Very Brief Peek at LINQ

A Very Brief Peek at LINQ

t PDC, Microsoft announced the Language Integrated Query framework (the LINQ Project). The LINQ Project is a set of language extensions to C# and Visual Basic and a unified programming model that extends the .NET Framework to offer integrated querying for objects, databases, and XML.

You can query against any of these three data sources, mixing and matching as appropriate. So, for instance, today we showed querying against a database table and an array, and then turned the output into XML.

LINQ is made up of a set of core query operators that can be applied to any .NET array or collection of objects, effectively providing SQL-like capabilities for in-memory data. Additionally, we are providing two APIs, codenamed DLinq (for SQL relational data access) and XLinq (for XML access).

These capabilities are available to any language that implements the core requirements of LINQ – currently we are showing implementations in Visual Basic and C#.

Here is a simple example of creating an array and then selecting the values over five:

   Dim primes = {1, 2, 3, 5, 7, 9, 11, 13}   Dim primesOverFive = _   Select p From p In primes Where p > 5

The cool thing is that this works against any IEnumerable, so you can go against the .NET Framework classes as well. In this example, we get the process name from the .NET GetProcess() call and limit it to those with more than 6 threads:

   Dim procs = Select p.ProcessName _   From p In Process.GetProcesses() _   Where p.Threads.Count > 6

It goes a lot further, but this is the idea. We’ve set up some sites with white papers, RSS feeds, and bits you can download that work with VS2005. (The online bits for C# are for Beta 2 of VS2005, the online bits for VB are for the Release Candidate of VS2005).

Check these links for more information about LINQ, and more about the future of Visual Basic.

You’ll be seeing a lot more coming from these sites in the future.

Share the Post:
XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as