How to write the following SQL server query in Dapper to complete the C# method?
public async Task<T> GetCountAsync<T>(List<int> ownerGroups, List<string> vessels, List<string> inspectionDateRanges, string typeOfInspection ) { //Final query that will be executed in SQL Server string query = $”SELECT REPLACE(Risk, ‘ ‘, ‘_’ ) AS Risk, COUNT(InspectionID) AS Count, (COUNT(InspectionID) * 100.0) / (SELECT COUNT(InspectionID) FROM [Inspection] WHERE TypeOfInspection = ‘SI’ AND Risk IS NOT NULL) AS Percentage […]