Click here to Skip to main content
15,887,267 members
Everything / LINQ

LINQ

LINQ

Great Reads

by Nish Nishant
An ExifReader class in C# that supports custom formatting and extraction. StyleCop compliant code, with demos for WPF and Windows Forms.
by Daniel Vaughan
Create best-in-breed cross-platform MVVM apps using Calcium for Xamarin.Forms.
by Roman Kiss
This article describes a design, implementation and tooling of model driven WorkflowServices logically centralized in the Repository and physically decentralized for their runtime projecting.
by Max Paulousky
This article presents the techniques and caveats of building Silverlight applications that can be notified about database state changes via polling duplex. WSHttp binding and CLR triggers are used to implement the solution as well.

Latest Articles

by Dario Picca
Save Key and Value in JSONformat using C# and LINQ
by Tragdor
A quick lesson in LINQ and dynamic Lambda statements
by Dev Leader
This article is follow up content to previous articles I've written about iterators and collections, but the benchmark results were NOT what I expected!
by Kenji Elzerman
Let's take a look at the very fundamentals of LINQ and how to use it.

All Articles

Sort by Title

LINQ 

24 Jan 2012 by Felice Pollano
Listed here are 5 interesting uses of Linq.Expression without writing a LinqToSomething provider, of course.
7 Sep 2019 by Lee P Richardson
This blog post lists 3 days to refactor EF Linq queries without killing Perf
5 Jan 2012 by qenn
Here's an example of a simple LINQ extension method for getting values that fall within a certain range from an IEnumerable collection.
1 Jan 2012 by Nathan Gloyn
My own generic repository
23 Apr 2012 by Giorgi Dalakishvili
This post is part of a series about building a simple mathematical expression evaluator.
10 Aug 2013 by John Atten
Wildcard search using LINQ
14 Nov 2013 by John Atten
C#: Query Excel and .CSV files using LinqToExcel.
25 Feb 2010 by Alphakoda
PLINQ /Parallel LINQ is part of the TPL (Task Parallel Library) and it makes your life easier when it comes to multi-core processor programming which is totally different from multithreading which allows more than one thread per process and you have no idea if they will be equally distributed across
19 Sep 2013 by Garry Pilkington
Four LINQ queries for returning single values using LINQ queries.
30 Nov 2011 by Pranay Rana
DataLoadOption in LINQ allows immediate loading and filtering of related data
7 Jun 2009 by StormySpike
Alright, let’s assume that we are lazy coders, we have building a lot of Linq queries lately, and it’s getting repetitive. We keep having to remember to add a certain where clause to every query, couldn’t we just abstract this somehow?
26 Jul 2011 by Pranay Rana
Building dynamic query with LINQ
3 Jun 2020 by Jeremy Likness
A primer on using LINQ to wring strongly typed queries directly in code
21 Feb 2010 by Don Kackman
How to dynamically evaluate a JOIN expression with Linq
10 Sep 2010 by User 6619207
Entity Framework Code First and WCF Data Services
22 May 2020 by Vlad Neculai Vizitiu
FileSystem Syncher
7 May 2013 by Rion Williams
Generating an MD5 hash from a string using LINQ.
29 Apr 2016 by Mayur V Lohite
26 Feb 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
This is a simple trick to find file names of a particular file type existing in a folder.
26 Jun 2015 by Sacha Barber
Getting LineNumber(s) in your XLINQ
2 Nov 2009 by Cyborgx37
LINQ is syntactical sugar for extension methods and lamda expressions. To understand LINQ, it is important to first grapple with these concepts.To begin, let's look at a simple and somewhat common scenario.
30 Jun 2015 by rahulsahay20
Different projection strategies in LINQ
23 Apr 2009 by merlin981
A simple example to show you how to GroupBy Multiple Values using LINQ
15 May 2011 by Raymund Macaalay
How to create dynamic LINQ queries.
5 Jun 2012 by ManojKumar19
Hands on Lab for MVVM, Value Converter, XAML Binding, Delegate Command pattern, INotifyPropertyChange, Lambda Expression, LINQ etc. in Silverlight/WPF project
13 Sep 2013 by Pragmateek
This article will give you more concrete information, mainly source code, if you need to implement a web API binding in .NET using the C# language.
13 Sep 2013 by Pragmateek
This article describes the general principles, without diving too deeply into technical details that would be specific to a given platform.
20 May 2018 by nirman b doshi
How to get name of the member (property name, etc.) of a .NET class without using hard-coded/ magic strings
8 Feb 2012 by HeWillem
How to instantiate derived LINQ to SQL entities
27 Jan 2012 by Dave C Andrews
How to join multiple columns with Linq to SQL
19 Apr 2009 by merlin981
Twitter feeds are provided in RSS XML format. This makes it very easy for us to parse out the information we want from a feed using LINQ to XML.
22 Sep 2017 by Petru Faurescu
Walkthrough article to run LINQ queries with MongoDB, import data and define indexes
19 Apr 2009 by merlin981
How to use the LINQ GroupBy feature.
10 Feb 2011 by Raymund Macaalay
How to use LINQ to Sharepoint
14 Nov 2018 by Vlad Neculai Vizitiu
IEnumerable and state machines
27 Nov 2012 by Rui Jarimba
A simple approach that will allow you to reuse the code used in the Select method
6 Dec 2009 by Duy H. Thai
Explore the essence of an 'LTS classes' file, the classes it generates, and how it connects the object model to the database model...
26 Jul 2011 by Pranay Rana
In this post, I am going to show two keywords in C# 3.0 which are very helpful when playing with a set of object collections using LINQ.
26 Jul 2011 by Pranay Rana
Difference between IQueryable and IEnumerable in terms of LINQ to SQL queries.
17 Mar 2023 by Dev Leader
This article is follow up content to previous articles I've written about iterators and collections, but the benchmark results were NOT what I expected!
8 Feb 2010 by Shakeel Iqbal
Lambda Expression is one of the best features of C# 3.0
30 May 2011 by Steve Wellens
You can use the LINQ library functions, which are extension methods, without having to delve into Reverse Polish SQL.
13 Feb 2010 by Philipp Sumi
A lightweight task scheduling library that allows you to easily schedule the invocation of callback methods at specified times or intervals. Supports .NET 3.5 and Silverlight.
3 Oct 2013 by BC3Tech
LINQ is awesome and Lazy is handy as heck, but using them together requires some thought.
29 Jul 2013 by Sandeep Shankar
In this post, we’ll see how the type of execution can boost performance in LINQ.
5 Jan 2012 by qenn
LINQ for PHP
3 Jan 2012 by JasonShort
Group By with NULL database values in LINQ.
26 Jul 2011 by Pranay Rana
SelectMany is a way to flatten several results into a single sequence.
29 Nov 2012 by Pranay Rana
LINQ query to compare only date part of DateTime.
7 Aug 2017 by JasonShort
A few common SQL query patterns, and their Linq to Entities (EF) equivalents
25 Feb 2013 by Colin Eberhardt
Creating a LINQ-style API for Objective-C has proven to be relatively simple (and fun!). I have provided implementations for some of the most common and useful LINQ methods, however the .NET LINQ APIs for querying collections have a great many more methods than the ones I have covered.
27 Sep 2010 by Raymund Macaalay
LINQ to SQL Essentials
21 Jul 2011 by ozkary
LINQ does not understand query hints: a workaround
18 Mar 2011 by Kristofer Kallsbo
Trying to join two tables that have a 1 to many relationship with LINQ to SQL
13 Mar 2011 by Kristofer Kallsbo
Updating several rows using LINQ to SQL.
15 Jun 2010 by Colin Eberhardt
This blog post demonstrates a Linq API which can be used to query the WPF / Silverlight Visual Tree.
19 Feb 2013 by Adam Zuckerman
Pulling XML data into your objects
12 Jan 2014 by Arun Ramachandran India
Element operations in LINQ
15 May 2011 by ambilykk
LINQ – Language Integrated Query
30 Mar 2014 by Arun Ramachandran India
Which are the Aggregation operators in LINQ
15 Apr 2010 by Paulo Morgado
LINQ: Enhancing Distinct With The PredicateEqualityComparer
15 Apr 2010 by Paulo Morgado
LINQ: Enhancing Distinct with the SelectorEqualityComparer
22 Feb 2010 by Nizar Noorani
Implementing IN and NOT IN in LINQ
12 Dec 2010 by Paulo Morgado
LINQ: Introducing The Skip Last Operators
13 Apr 2010 by Paulo Morgado
LINQ: Single vs. First
15 Apr 2010 by Paulo Morgado
LINQ: Single vs SingleOrDefault
7 Aug 2017 by JasonShort
LINQPad helps you learn LINQ
5 Jan 2012 by JasonShort
LINQPad is sort of like a Notepad, you can write and edit .linq files using it.
1 Dec 2011 by Pranay Rana
Log your LINQ query
21 Jul 2020 by Jeremy Likness
Learn how to parse complex expression trees, and even modify them to alter IQueryable results.
6 Dec 2009 by Duy H. Thai
With LINQ-to-SQL, how many methods do we need for CRUD operations in ALL of the tables in a database? The answer is 4 - no kidding.
16 Nov 2013 by Debopam Pal
Using Microsoft.Office.Interop.Excel library, you can bring your data from your database against LINQ query and store them into an Excel Sheet.
8 Aug 2020 by Vlad Neculai Vizitiu
Mocking/stubbing lambda expressions to have a bit more control over our unit tests
29 Sep 2016 by matt warren
How to optimize Linq
9 Aug 2011 by Pranay Rana
How to do ordering when you require to order data by using multiple columns
2 Jan 2020 by Petru Faurescu
Best way, performance wise, to paginate results in MongoDB
22 Sep 2017 by Petru Faurescu
Few insights on how to better paginate results in MongoDB, and to achieve excellent performance
18 Jun 2015 by Duke Of Haren
Playing around with LINQ for JavaScript
7 Jun 2012 by James Curran
An article on PropertyBagTextWriter.
2 Mar 2020 by Rion Williams
C# local functions and how they can be used to make code more readable
24 Jan 2021 by YawerIqbal
Tips to query audit history
4 Jan 2016 by levelnis
Real-time filtering of a grid or list
22 Sep 2014 by adityaswami89
This blog post discusses the Repository Pattern
21 Sep 2020 by Jeremy Likness
What if I could write a LINQ query on a client the same way I would on a server, and execute it remotely with minimal configuration, setup, ritual and ceremony?
1 Jun 2020 by gmtzgtz
How to write a LINQ statement with multiple joins
19 Aug 2013 by morzel
How to match text which is preceded by some other text? How to reference matched text to find closing tag? Read this post if you want to know the answers to these and few other questions.
30 Jul 2009 by Pete O'Hanlon
Silverlight charts, and reaching my inner child
7 Aug 2017 by JasonShort
In this article, I want to cover a particular problem I have had many times over the years. How do you speed up multithreaded apps that are bound by blocking functions, or long running I/O operations?
12 Aug 2015 by Gaurav Aroraa
SQL Like Functionality in LINQ?
31 Dec 2010 by rusanu
SqlDependency based caching of LINQ Queries
1 Oct 2011 by Tarun_Arora
How to use the TFS API to get the security groups, members, permissions and security settings of users in Team Projects in TFS
18 Mar 2010 by Sam Meacham
So what’s wrong with EF’s TPT inheritance? The SQL that EF generates. With some simple testing (2 or 3 subclasses) everything may appear to be fine. In fact, you may even be impressed that EF manages to fetch all the data you need in a single trip, indeed, in a single query.
7 Sep 2023 by Tragdor
A quick lesson in LINQ and dynamic Lambda statements
5 Dec 2013 by Mithun Pattankar
Three examples of deferred vs. immediate execution in LINQ using C#
23 Dec 2009 by Bryan Thomas Weikel
CodeProject"LEK" is a three-tier .NET WinForms accounting application that can be configured at run time to use either LINQ to SQL, Entity Framework or NHibernate to access data in either a "main" or "testing" SQL Server database.
19 Oct 2014 by adityaswami89
This article will guide you if you want to create your own custom ORM or a wrapper over the ORM. This is only for demo towards the Unit of work pattern with Repository and a singleton Session class.
27 Mar 2017 by Paul D. Sheriff
In this blog post, you will use LINQ to XML to read state codes from an XML file and display those values on a web page.
5 Jun 2009 by StormySpike
Using Expressions for Fun and Profit
15 Apr 2010 by Joe Rattz
Using LINQ To Filter By Object Type and Then Quantify
11 Sep 2012 by Joe Rattz
Using LINQ to filter by object type and then quantify.