is there any way i can convert below syntax to LINQ equivalent.
select DateName( month , DateAdd( month , month(cour_date) , 0 ) - 1 ),count(*)
from course
where cour_date>CONVERT(varchar, YEAR(GETDATE())) + '-01' + '-01'
and cour_deleted is null and cour_type='Group'
group by month(cour_date)
order by month(cour_date)
You can use something like this:
For each
IGrouping<DateTime, course>in the query you have the Count value, and you can also format the DateTime value of cour_date to convert mount in a string.