How to convert the following sql query to lambda expression?
SELECT Username, COUNT(Username) AS Count FROM user GROUP BY Username
var UserCount = yourEntityObject.GroupBy(m => m.Username) .Select(c => new {Username = c.Key, Count = c.Count()});
1.4m articles
1.4m replys
5 comments
57.0k users