. Net linq Overview

Source: Internet
Author: User

    LINQ
It provides powerful query functions for C # and Visual Basic syntax. LINQ introduces a standard and easy-to-learn Data Query and update mode, which can be extended to support almost any type of data storage. Visual Studio contains the assembly of the LINQ provider. With these assembly, you can use LINQ for. NET Framework collections, SQL Server databases, ADO. NET datasets, and XML documents.
  • Use Cases
  • LINQ Query
  •  

     ( num  numQuery){    Console.Write(, num);}
     evenNumQuery =      num  numbers     (num % 2) == 0     num; evenNumCount = evenNumQuery.Count();
    > numQuery2 =    ( num  numbers      (num % 2) == 0      num).ToList();
    • Supports the functions of LINQ.
    • LINQ generic
     cust  customers     cust.City ==      cust; (Customer customer  customerQuery){    Console.WriteLine(customer.LastName +  + customer.FirstName);}

     customerQuery2 =      cust  customers     cust.City ==      cust;( customer  customerQuery2){    Console.WriteLine(customer.LastName +  + customer.FirstName);}
    • LINQ to Objects

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.