[Solved] How to use GroupBy in LINQ? [duplicate]
Try this, var products = from listProducts in repository.All() where listProducts.Code == “48654” group listProducts by listProducts.family into grp select grp; For more information visit LINQ Group By 0 solved How to use GroupBy in LINQ? [duplicate]