This is a personal reference for me but if it helps someone, all the better!

Group items by multiple keys

e.g. Group activities by the year and month of their start date (“StartDate” is of type DateTime).

var activitesGroupedByMonthAndYear =
	from a in activities
	group a by new { Year = a.StartDate.Year, Month = a.StartDate.Month }
	into activitiesGrouped
	select new
	{
	    Key = new { Month = activitiesGrouped.Key.Month, Year = activitiesGrouped.Key.Year },
	    Activities = activitiesGrouped
	};

Case insensitive string contains search

Out of the box, the entity framework provider will do a case insensitive search when just using Contains. It will be converted to a SQL “like” where clause (where value like %searchValue%).

var result = people.Where(p => p.Name.Contains("Dave"));

The above would generate the following SQL:

select * from people where Name like %Dave%