Posts Tagged ‘Linq to sql’

IN queries with LINQ to SQL

This is another awesome feature in LINQ to SQL that i always forget about. Sometimes you have an array of strings or any other type and want to query the database for all values that have one of the values in the array. string platform = “windows|linux”; string[] platformList = platform.Split(‘|’); itemQuery = from m [...]

Group By with LINQ

Today i wanted to do a group by query with LINQ wich is something i never done before. I turned out to be kind of easy. If you just want to group by a single field. (from s in db.CrewStatsSet where s.LogDate >= date1 && s.LogDate <= date2 && s.Action == action group s by [...]