I want to get an invoice for each month, but the invoice should be no more than one per day, even if there are several cases. I have an SQL query that works correctly, but it has problems converting to LINQ -
select count(DISTINCT DAY(date)) as Monthly_Count, MONTH(date) as Month, YEAR(date) from activity where id=@id group by YEAR(date), MONTH(date)
Can someone help me translate the above query into LINQ. Thanks!
source share