c# linq cheat sheet pdf code example
Example 1: linq cheat sheet
var query = from m in Manufacturers
where m.Name == "Trek"
select new {Name = m.Name, Key = m.ManufacturerId};
var lambda = Manufacturers.Where(m => m.Name == "Trek").Select(m=> new {Name = m.Name, Key = m.ManufacturerId});
Example 2: linq cheat sheet
var query = from m in Manufacturers
where m.Name == "Trek"
select m;
var lambda = Manufacturers.Where(m => m.Name == "Trek").Select(m => m);