Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Minor changes ShipmentService (GetShipmentsByIds)

supportc30d80917291
diff --git a/src/Business/Grand.Business.Checkout/Services/Shipping/ShipmentService.cs b/src/Business/Grand.Business.Checkout/Services/Shipping/ShipmentService.cs
index 03191ecc8..977c7fcee 100644
--- a/src/Business/Grand.Business.Checkout/Services/Shipping/ShipmentService.cs
+++ b/src/Business/Grand.Business.Checkout/Services/Shipping/ShipmentService.cs
@@ -105,17 +105,7 @@ namespace Grand.Business.Checkout.Services.Shipping
var query = from o in _shipmentRepository.Table
where shipmentIds.Contains(o.Id)
select o;
- var shipments = await Task.FromResult(query.ToList());
-
- //sort by passed identifiers
- var sortedOrders = new List<Shipment>();
- foreach (string id in shipmentIds)
- {
- var shipment = shipments.Find(x => x.Id == id);
- if (shipment != null)
- sortedOrders.Add(shipment);
- }
- return sortedOrders;
+ return await Task.FromResult(query.ToList());
}