Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Need to groupby and count with EF

$
0
0

Hi all

this code does what I want

SELECT
    MemberId,
    Action,
    COUNT(*)AS CntFROM#ReportStatsGROUPBY MemberId, ActionORDERBY MemberId

and the result is this

MemberId    Action      Cnt1           change      21create21           deactivate  22           change      42create12           deactivate  1

However, how can I achive it by EF?


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>