Changed a lot LOL

This commit is contained in:
2020-11-04 17:08:13 -05:00
parent d06925204d
commit 3f6faacab8
21 changed files with 489 additions and 64 deletions

View File

@@ -271,6 +271,11 @@ namespace PartSource.Services
}
public IList<Vehicle> GetVehiclesForPart(string partNumber, string lineCode)
{
return GetVehiclesForPart(partNumber, lineCode, -1);
}
public IList<Vehicle> GetVehiclesForPart(string partNumber, string lineCode, int maxVehicles)
{
if (string.IsNullOrEmpty(partNumber) || string.IsNullOrEmpty(lineCode))
{
@@ -290,6 +295,11 @@ namespace PartSource.Services
v => new { v.BaseVehicleId, v.EngineConfigId },
(f, v) => v);
if (maxVehicles > 0)
{
vehicles = vehicles.Take(maxVehicles);
}
return vehicles.ToList();
}
}