System. Linq
LINQ, Language-level integrated query (LAnguageINTegratedQUery)
Over the past 20 years, the application of object-oriented programming technology (OO) in the industrial field has entered a stable development stage. Programmers now recognize language features such as classes, objects, and methods. Observing the present and next-generation technologies, a major challenge of new programming technologies has begun to emerge. That is, since the birth of object-oriented technology, it has not solved the problem of reducing access and integrating information (accessing and integrating information) complexity issues. Two of the most accessed data sources are related to databases and XML.
A more general approach is provided.. Net Framework adds query facilities that can be applied to all sources of information ), this is a better way than adding relational or XML-like features to the development language and runtime. These syntax features are called. NET Language Integrated Query (LINQ ).
Including DLinq and XLinq
Syntax instance
C #3.0 query syntax
First, let's look at a very simple LINQ query example to query numbers smaller than 5 in an int array and sort them in order of size:
Class Program
{
Static void Main (string [] args)
{
Int [] arr = new int [] {8, 5, 89, 3, 56, 4, 1, 58 };
Var m = from n in arr