I'm porting legacy code that utilized stored procedures to Entity Framework Core. The stored procedure looks like:
SELECT Distinct DiagnosisCode, DiagnosisCodeDescription, Count(*) as Count from tbl_Log_PatientDiagnosisCodes Where DiagnosisCode <> '' And (DateofService > '01/01/2018' And DateofService < '06/30/2018') Group By DiagnosisCode, DiagnosisCodeDescription Order By Count Desc
I have two questions. First, how do I convert this to a Linq query? Second, what considerations should I look at as to whether to keep using stored procedures? Any help would be appreciated.