Ashish Patel: Notes

Atom feed

Recently added: Conventional commits, Cli, Shortcuts, Subscriptions, Topic

Linq

LINQ (Language Integrated Query) is uniform query syntax in C# and VB.NET used to save and retrieve data from different sources.

Types

It can be used in two ways i.e Query Syntax and Method Syntax.

Query Syntax

var result = from s in stringList
            where s.Contains("Ashish") 
            select s;

Method Syntax

var result = stringList.Where(s => s.Contains("Ashish"));

Query Operators

Standard Query Operators in LINQ are actually extension methods for the IEnumerable and IQueryable types.

Query Syntax

var result = from s in stringList
            where s.Contains("Ashish") 
            select s;

Created 2019-01-23T11:57:03+05:30, updated 2022-01-29T02:34:00+00:00 · History · Edit