API módosítása
This commit is contained in:
@@ -6,6 +6,7 @@ namespace WorkFlowCheck.BL.Services.Interfaces
|
||||
public interface ISyncService
|
||||
{
|
||||
Task<List<CheckPointDTO>> GetAllCheckPointAsync();
|
||||
Task<CheckPointDTO> GetCheckPointAsync(int id);
|
||||
Task<List<LocationDTO>> GetAllLocationAsync();
|
||||
Task<List<EquipmentDTO>> GetAllEquipmentAsync();
|
||||
|
||||
|
||||
@@ -43,6 +43,29 @@ namespace WorkFlowCheck.BL.Services
|
||||
|
||||
return retVal;
|
||||
}
|
||||
public async Task<CheckPointDTO> GetCheckPointAsync(int id)
|
||||
{
|
||||
var retVal = new CheckPointDTO();
|
||||
|
||||
try
|
||||
{
|
||||
var res = await _dbContext.CheckPoints
|
||||
.Include(i => i.CheckListTemplateRows)
|
||||
.Where(w => w.Id == id)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefaultAsync();
|
||||
if (res != null)
|
||||
{
|
||||
retVal = _mapper.Map<CheckPointDTO>(res);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.Message);
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
public async Task<List<LocationDTO>> GetAllLocationAsync()
|
||||
{
|
||||
var retVal = new List<LocationDTO>();
|
||||
|
||||
Reference in New Issue
Block a user