You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
845 B
29 lines
845 B
using WMS_GIRAF_Interface.Data;
|
|
using WMS_GIRAF_Interface.Entities;
|
|
using WMS_GIRAF_Interface.Repositories.Interface;
|
|
|
|
namespace WMS_GIRAF_Interface.Repositories.Implement;
|
|
|
|
public class destinationIdRepository : IdestinationIdRepository
|
|
{
|
|
private readonly MichelinDbContext _context;
|
|
private readonly ILogger<destinationIdRepository> _logger;
|
|
public destinationIdRepository(MichelinDbContext context, ILogger<destinationIdRepository> logger)
|
|
{
|
|
_context = context;
|
|
_logger = logger;
|
|
}
|
|
|
|
public destinationId? GetDestinationId(int? lineNumber)
|
|
{
|
|
if (lineNumber!=0)
|
|
{
|
|
throw new ArgumentException(nameof(GetDestinationId));
|
|
}
|
|
|
|
var destinationIdInfo = _context.DestinationId.FirstOrDefault(x => x.ID == lineNumber);
|
|
|
|
return destinationIdInfo;
|
|
}
|
|
|
|
}
|