mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-04-22 10:56:39 +00:00
cleanup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user