44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
namespace LaaProduction.Cordonel
|
|
{
|
|
using LaaProduction.Cordonel.Data.Interfaces;
|
|
using LaaProduction.Cordonel.Interfaces;
|
|
using LaaProduction.Cordonel.Models;
|
|
|
|
public class EOLProgressService : IEOLProgressService
|
|
{
|
|
private readonly IEOLProgressRepository eolRepository;
|
|
|
|
public EOLProgressService(IEOLProgressRepository eolRepository)
|
|
{
|
|
this.eolRepository = eolRepository;
|
|
}
|
|
|
|
public EOLProgressModel Complete(int pcbid, string hostname, Status status)
|
|
{
|
|
return this.eolRepository.Complete(pcbid, hostname, status);
|
|
}
|
|
|
|
public EOLProgressModel Delete(int pcbid)
|
|
{
|
|
return this.eolRepository.Delete(pcbid);
|
|
}
|
|
|
|
public EOLProgressModel GetOrCreate(int pcbid, string hostname)
|
|
{
|
|
var model = this.eolRepository.Find(pcbid);
|
|
|
|
if (model is null)
|
|
{
|
|
model = this.eolRepository.Create(pcbid, hostname);
|
|
}
|
|
|
|
return model;
|
|
}
|
|
|
|
public EOLProgressModel Update(EOLProgressModel model)
|
|
{
|
|
return this.eolRepository.Update(model);
|
|
}
|
|
}
|
|
}
|