<PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="Npgsql" Version="6.0.0" />
var result = (await _npgsqlConnection.QueryAsync<dynamic>("SELECT minute, count(Id) as doccount FROM generate_series(:StartTime, :EndTime, interval '1 MINUTE') as g(minute) LEFT JOIN ods_tsc_order ON date_trunc('minute', ordertime) = minute GROUP BY minute ORDER BY minute;", new { StartTime = oneHourAgo.AddMinutes(-1), EndTime = request.Now.Value })).ToList();