Ashish Patel: Notes

Atom feed

Recently added: Xunit, Publisher subscriber pattern, Request reply pattern, Middleware pattern, Command pattern

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:45:03+05:18, updated 2022-01-29T02:34:00+00:00 · History · Edit