Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- group by person.cn.Split(separators)[0]
- group by person.cn.Substring(0,5)
- string oneSpace = " ";
- string fiftySpace = " ";
- var query =
- from person in db.Persons
- let lastname = person.cn.Replace(oneSpace, fiftySpace).SubString(0, 50).Trim()
- group person by lastname into g
- select new { Key = g.Key, Count = g.Count };
Add Comment
Please, Sign In to add comment