'C#/LINQ'에 해당되는 글 1건

  1. 2018.08.17 C#-LINKQ : 소개 1

C#-LINKQ : 소개

C#/LINQ 2018. 8. 17. 13:56

[ C#-LINKQ : 소개 ]

 

1. 참고URL

    - 단계적으로 설며이 잘되어 있음.

       MS 공식 SITE

       https://docs.microsoft.com/ko-kr/dotnet/csharp/programming-guide/concepts/linq/

 

    - Q&A용 게시판

       https://code.i-harness.com/ko/q/12814a

 

2. 사용가능객체

    - SQL Server 데이터베이스 : LINQ to SQL

    - XML 문서                         : LINQ to XML(C#)

    - ADO.NET 데이터 집합       : LINQ to DataSet

    - IEnumerable, 제네릭 IEnumerable<T> 인터페이스를 지원하는 모든 개체 컬렉션 : LINQ to Objects(C#)

 

3. LINQ 예약어

    - 기본  : from, where orderby select

    - 추가 : join, concat, ....

 

4. LINQ(Query) syntax와 Method Syntax

    - int[] numbers = { 5, 10, 8, 3, 6, 12};

    - Query syntax

       IEnumerable<int> numQuery1 = from num in numbers
                                                        where num % 2 == 0
                                                        orderby num
                                                        select num;

    - Method syntax
       IEnumerable<int> numQuery2 = numbers.Where(num => num % 2 == 0).OrderBy(n => n);

    ** 위 같은 형식을 : "람다식" 이라 함.

 

Posted by 농부지기
,