This commit is contained in:
Anton Martynenko
2025-11-19 18:27:35 +01:00
parent 48ebad0609
commit 9048a7b3ec
6 changed files with 56 additions and 54 deletions
@@ -44,14 +44,6 @@ public class RouteRepository : IRouteRepository
ORDER BY sequence_number";
var points = (await connection.QueryAsync<RoutePointEntity>(sql, new { RouteId = routeId })).ToList();
if (points.Any())
{
_logger.LogInformation("RouteRepository - Read {Count} points from DB for route {RouteId}. First: Lat={Lat:F12}, Lon={Lon:F12}, Last: Lat={LastLat:F12}, Lon={LastLon:F12}",
points.Count, routeId, points[0].Latitude, points[0].Longitude,
points[^1].Latitude, points[^1].Longitude);
}
return points;
}
@@ -82,13 +74,6 @@ public class RouteRepository : IRouteRepository
@PointType, @SegmentIndex, @DistanceFromPrevious, @CreatedAt)";
var pointsList = points.ToList();
if (pointsList.Any())
{
_logger.LogInformation("RouteRepository - Inserting {Count} points to DB. First: Lat={Lat:F12}, Lon={Lon:F12}, Last: Lat={LastLat:F12}, Lon={LastLon:F12}",
pointsList.Count, pointsList[0].Latitude, pointsList[0].Longitude,
pointsList[^1].Latitude, pointsList[^1].Longitude);
}
await connection.ExecuteAsync(sql, pointsList);
}