Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / LINQ

LINQ

LINQ

Great Reads

by Felice Pollano
Listed here are 5 interesting uses of Linq.Expression without writing a LinqToSomething provider, of course.
by Paul_Wade
A WPF application for viewing RSS video feeds. Built using the MVVM pattern.
by Pranay Rana
(Linq and Nullable Values) OR (SQL ISNULL with LINQ)
by #realJSOP
Don't reinvent the wheel - use the one that's already on the cart.

Latest Articles

by Felice Pollano
Listed here are 5 interesting uses of Linq.Expression without writing a LinqToSomething provider, of course.
by Paul_Wade
A WPF application for viewing RSS video feeds. Built using the MVVM pattern.
by Pranay Rana
(Linq and Nullable Values) OR (SQL ISNULL with LINQ)
by #realJSOP
Don't reinvent the wheel - use the one that's already on the cart.

All Articles

Sort by Score

LINQ 

by Felice Pollano
Listed here are 5 interesting uses of Linq.Expression without writing a LinqToSomething provider, of course.
by Lee P Richardson
This blog post lists 3 days to refactor EF Linq queries without killing Perf
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.
by Nathan Gloyn
My own generic repository
by Giorgi Dalakishvili
This post is part of a series about building a simple mathematical expression evaluator.
by John Atten
Wildcard search using LINQ
by John Atten
C#: Query Excel and .CSV files using LinqToExcel.
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
by Garry Pilkington
Four LINQ queries for returning single values using LINQ queries.
by Pranay Rana
DataLoadOption in LINQ allows immediate loading and filtering of related data
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?
by Pranay Rana
Building dynamic query with LINQ
by Jeremy Likness
A primer on using LINQ to wring strongly typed queries directly in code
by Don Kackman
How to dynamically evaluate a JOIN expression with Linq
by User 6619207
Entity Framework Code First and WCF Data Services
by Vlad Neculai Vizitiu
FileSystem Syncher
by Rion Williams
Generating an MD5 hash from a string using LINQ.
by Mayur V Lohite
Generic Repository Pattern MVC
by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
This is a simple trick to find file names of a particular file type existing in a folder.
by Sacha Barber
Getting LineNumber(s) in your XLINQ
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.
by rahulsahay20
Different projection strategies in LINQ
by merlin981
A simple example to show you how to GroupBy Multiple Values using LINQ
by Raymund Macaalay
How to create dynamic LINQ queries.
by ManojKumar19
Hands on Lab for MVVM, Value Converter, XAML Binding, Delegate Command pattern, INotifyPropertyChange, Lambda Expression, LINQ etc. in Silverlight/WPF project
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.
by Pragmateek
This article describes the general principles, without diving too deeply into technical details that would be specific to a given platform.
by nirman b doshi
How to get name of the member (property name, etc.) of a .NET class without using hard-coded/ magic strings
by HeWillem
How to instantiate derived LINQ to SQL entities
by Dave C Andrews
How to join multiple columns with Linq to SQL
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.
by Petru Faurescu
Walkthrough article to run LINQ queries with MongoDB, import data and define indexes
by merlin981
How to use the LINQ GroupBy feature.
by Raymund Macaalay
How to use LINQ to Sharepoint
by Vlad Neculai Vizitiu
IEnumerable and state machines
by Rui Jarimba
A simple approach that will allow you to reuse the code used in the Select method
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...
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.
by Pranay Rana
Difference between IQueryable and IEnumerable in terms of LINQ to SQL queries.
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 Shakeel Iqbal
Lambda Expression is one of the best features of C# 3.0
by Steve Wellens
You can use the LINQ library functions, which are extension methods, without having to delve into Reverse Polish SQL.
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.
by Arun Ramachandran India
Element operations in LINQ
by ambilykk
LINQ – Language Integrated Query
by Arun Ramachandran India
Which are the Aggregation operators in LINQ
by BC3Tech
LINQ is awesome and Lazy is handy as heck, but using them together requires some thought.
by Sandeep Shankar
In this post, we’ll see how the type of execution can boost performance in LINQ.
by qenn
LINQ for PHP
by JasonShort
Group By with NULL database values in LINQ.
by Pranay Rana
SelectMany is a way to flatten several results into a single sequence.
by Pranay Rana
LINQ query to compare only date part of DateTime.
by JasonShort
A few common SQL query patterns, and their Linq to Entities (EF) equivalents
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.
by Raymund Macaalay
LINQ to SQL Essentials
by ozkary
LINQ does not understand query hints: a workaround
by Kristofer Kallsbo
Trying to join two tables that have a 1 to many relationship with LINQ to SQL
by Kristofer Kallsbo
Updating several rows using LINQ to SQL.
by Colin Eberhardt
This blog post demonstrates a Linq API which can be used to query the WPF / Silverlight Visual Tree.
by Adam Zuckerman
Pulling XML data into your objects
by Paulo Morgado
LINQ: Enhancing Distinct With The PredicateEqualityComparer
by Paulo Morgado
LINQ: Enhancing Distinct with the SelectorEqualityComparer
by Nizar Noorani
Implementing IN and NOT IN in LINQ
by Paulo Morgado
LINQ: Introducing The Skip Last Operators
by Paulo Morgado
LINQ: Single vs. First
by Paulo Morgado
LINQ: Single vs SingleOrDefault
by JasonShort
LINQPad is sort of like a Notepad, you can write and edit .linq files using it.
by JasonShort
LINQPad helps you learn LINQ
by Pranay Rana
Log your LINQ query
by Jeremy Likness
Learn how to parse complex expression trees, and even modify them to alter IQueryable results.
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.
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.
by Vlad Neculai Vizitiu
Mocking/stubbing lambda expressions to have a bit more control over our unit tests
by matt warren
How to optimize Linq
by Pranay Rana
How to do ordering when you require to order data by using multiple columns
by Petru Faurescu
Best way, performance wise, to paginate results in MongoDB
by Petru Faurescu
Few insights on how to better paginate results in MongoDB, and to achieve excellent performance
by Duke Of Haren
Playing around with LINQ for JavaScript
by James Curran
An article on PropertyBagTextWriter.
by Rion Williams
C# local functions and how they can be used to make code more readable
by YawerIqbal
Tips to query audit history
by levelnis
Real-time filtering of a grid or list
by adityaswami89
This blog post discusses the Repository Pattern
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?
by gmtzgtz
How to write a LINQ statement with multiple joins
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.
by Pete O'Hanlon
Silverlight charts, and reaching my inner child
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?
by Gaurav Aroraa
SQL Like Functionality in LINQ?
by rusanu
SqlDependency based caching of LINQ Queries
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
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.
by Tragdor
A quick lesson in LINQ and dynamic Lambda statements
by Mithun Pattankar
Three examples of deferred vs. immediate execution in LINQ using C#
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.
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.
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.
by StormySpike
Using Expressions for Fun and Profit
by Joe Rattz
Using LINQ to filter by object type and then quantify.
by Joe Rattz
Using LINQ To Filter By Object Type and Then Quantify
by Jeremy Likness
A look at the latest Azure SDKs for .NET with a sample .NET Core app that uses the Cosmos DB SDK and LINQ to iterate over documents with a dynamic schema.
by Bryan O'Connell
Using LINQ to SQL for ETL projects.
by Chris_Green
Welcome Microsoft Delegate! Lambda Expressions right this way…
by Matthew Edmondson
What exactly is Func? What has it got to do with LINQ?
by Komal Mangal
How to work with LINQ to XML