Select is a LINQ functionality to define a data format of the query results. Each of below examples is presented in C# with both Lambda and Query expression. Let’s create a Person class. public class Person { public string Forename { get; set; } public string Surname { get; set; } public DateTime DateOfBirth { … Continue reading C# – LINQ Select Examples
Category: LINQ
C# – LINQ Where Examples
Where is a LINQ functionality to filter data in a query with given criteria. Each of below examples is presented in C# with both Lambda and Query expression. 1. Collection of strings – single condition Query collection to get items which start with “b”. var colors = new List<string>() { “red”, “green”, “blue”, “black”, “white” … Continue reading C# – LINQ Where Examples