C# LINQ - Counting Elements In Groups

  Рет қаралды 10,471

Jamie King

Jamie King

12 жыл бұрын

Jamie King showing why groups are useful by counting the number of elements in a group.

Пікірлер: 4
@JamieKingCS
@JamieKingCS 11 жыл бұрын
Once you have your counts of the number of groups, you OrderByDescending() and then Take(howeverManyGroupsYouWant)
@ghostbusterz
@ghostbusterz 9 жыл бұрын
Is there a reason they made the LINQ query syntax require you to type "group c by " yet only require "orderby "? Because in method syntax they are typed the same (OrderBy & GroupBy). It seems unnecessary to have the c between "group" and "by" as it is isn't needed with "orderby".
@ianpaulbudiman5196
@ianpaulbudiman5196 11 жыл бұрын
But how about if we want to just display the most country(ies) which has the most customers without to mentioned the number of the customers. Example: USA and UK both have 50 customers, so based on the grouping we made we wanna just display: USA, UK
C# LINQ - let Clauses And Also Transparent Identifiers
6:09
Jamie King
Рет қаралды 7 М.
C# LINQ - group by
7:03
Jamie King
Рет қаралды 26 М.
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 64 МЛН
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 19 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 67 МЛН
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 14 МЛН
Collections in C# .NET
6:03
Interview Happy
Рет қаралды 34 М.
Entity Framework Core vs Dapper Performance in 2023
13:59
Nick Chapsas
Рет қаралды 95 М.
Part 18   GroupBy in LINQ
10:28
kudvenkat
Рет қаралды 117 М.
Learn Kotlin in 12 Minutes
12:01
Rahul Pandey
Рет қаралды 316 М.
Algorithm Worst Case Complexity
18:42
Jamie King
Рет қаралды 3,8 М.
How To Use Both EF Core and Dapper For CQRS Queries
13:01
Milan Jovanović
Рет қаралды 14 М.
Dapper vs Entity Framework: Efficient Data Access in C#
9:00
STARTUP HAKK
Рет қаралды 284
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 64 МЛН