Category: LINQ

  • Simple self-join with LINQ and SQL

    Let’s say we have a table in which we store the various test results of a persons. PersonId TestId Result 1 TOEFL 5 1 IELTS 10 2 TOEFL 10 2 IELTS 6 3 TOEFL 2 4 IELTS 4 And assuming that it has been queried and stored in a list of objects. (This is a…

  • Basics of LINQ II

    After a very simple beginning of LINQ let’s continue to play with it more. In this article, I will try to share some basic methods such as First,Last, Max and Min. 1. Numbers Example: Let’s create an int array with some numbers and find the first number, last number, first number which is greater then 4,…

  • Basics of LINQ

    Some notes on LINQ Language-Integrated Query (LINQ) is the technology that provides tools for developers to use query directly in the programming language (C#). A query is an expression that retrieves data from a data source. In LINQ, you work with objects. You use the codes to query and transform data in XML documents, SQL databases, Datasets, collections, and…