Linq to SQL Select Query explanation.
Linq to SQL Select Query explanation.
Web Developer
I am a professional .NET developer with over 4 years of hands-on industry experience in designing, developing, and maintaining scalable web applications. I specialize in .NET Core, C#, RESTful APIs, and database-driven systems using SQL Server.
LINQ Concat() in C#
The
Concat()method in LINQ is used to combine two sequences (collections) into a single sequence without removing duplicates.Basic Syntax
firstCollection, followed by all the elements ofsecondCollection.Example with int type collection-
The above program combines the two integer list into a new integer list.
Example with string type collection
When to use Concat()
Also, read: How to use DefaultIfEmpty() function in LINQ with C#?