State of OMG-LEGION prior to merge
This commit is contained in:
@@ -10,7 +10,6 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PartSource.Services
|
||||
{
|
||||
[Obsolete]
|
||||
public class PartService
|
||||
{
|
||||
private readonly PartSourceContext _context;
|
||||
@@ -20,31 +19,21 @@ namespace PartSource.Services
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public Part GetPart(string partNumber, string lineCode)
|
||||
{
|
||||
return _context.Parts.FirstOrDefault(p => p.PartNumber == partNumber && p.Manufacturer.LineCode == lineCode);
|
||||
}
|
||||
|
||||
public Part GetPart(int sku)
|
||||
{
|
||||
return _context.Parts.FirstOrDefault(p => p.Sku == sku);
|
||||
}
|
||||
|
||||
public async Task<PartsAvailability> GetInventory(int sku, int storeNumber)
|
||||
{
|
||||
return await _context.PartAvailabilities.FirstOrDefaultAsync(s => s.Store == storeNumber && s.SKU == sku);
|
||||
}
|
||||
|
||||
public IList<Fitment> GetFitments(FitmentSearchDto fitmentSearchDto)
|
||||
public async Task<Part> GetPartBySku(string sku)
|
||||
{
|
||||
return null;
|
||||
return await _context.Parts.SingleOrDefaultAsync(p => p.Sku == sku);
|
||||
}
|
||||
|
||||
//return _context.Fitments.Where(f =>
|
||||
// f.ManufacturerCode == fitmentSearchDto.ManufacturerCode &&
|
||||
// f.PartNumber == fitmentSearchDto.PartNumber &&
|
||||
// f.BaseVehicleId == fitmentSearchDto.BaseVehicleId &&
|
||||
// f.EngineConfigId == fitmentSearchDto.EngineConfigId
|
||||
//).ToList();
|
||||
public async Task<IList<DcfMapping>> GetDcfMapping(string partsourceLineCode)
|
||||
{
|
||||
return await _context.DcfMappings
|
||||
.Where(dcf => dcf.LineCode == partsourceLineCode)
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user