API és endpoint kiegészítése
This commit is contained in:
@@ -19,7 +19,9 @@ namespace WorkFlowCheck.BL.Mappings
|
||||
.ForMember(dest => dest.PasswordHash, opt => opt.MapFrom<PasswordHashResolver>());
|
||||
|
||||
|
||||
CreateMap<CheckListTemplateHeader, CheckListTemplateHeaderDTO>();
|
||||
CreateMap<CheckListTemplateHeader, CheckListTemplateHeaderDTO>()
|
||||
.ForMember(dest => dest.CheckListTemplateRowDTO, opt => opt.MapFrom(src => src.CheckListTemplateRows));
|
||||
CreateMap<CheckListTemplateRow, CheckListTemplateRowDTO>();
|
||||
CreateMap<CheckPoint, CheckPointDTO>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace WorkFlowCheck.BL.Services.Interfaces
|
||||
{
|
||||
public interface ISyncService
|
||||
{
|
||||
Task<CheckPointListDTO> GetAllCheckPoint();
|
||||
Task<CheckPointListDTO> GetAllCheckPointAsync();
|
||||
Task<List<CheckListTemplateHeaderDTO>> GetAllCheckListTemplateAsync();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace WorkFlowCheck.BL.Services
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
public async Task<CheckPointListDTO> GetAllCheckPoint()
|
||||
public async Task<CheckPointListDTO> GetAllCheckPointAsync()
|
||||
{
|
||||
var retVal = new CheckPointListDTO();
|
||||
|
||||
@@ -39,6 +39,27 @@ namespace WorkFlowCheck.BL.Services
|
||||
|
||||
return retVal;
|
||||
}
|
||||
public async Task<List<CheckListTemplateHeaderDTO>> GetAllCheckListTemplateAsync()
|
||||
{
|
||||
var retVal = new List<CheckListTemplateHeaderDTO>();
|
||||
|
||||
try
|
||||
{
|
||||
var res = await _dbContext.CheckListTemplateHeaders.Include(i => i.CheckListTemplateRows).AsNoTracking().ToListAsync();
|
||||
|
||||
if (res != null)
|
||||
{
|
||||
retVal = _mapper.Map<List<CheckListTemplateHeaderDTO>>(res);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex.Message);
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
public async Task<CheckPointListDTO> GetAllLocation()
|
||||
{
|
||||
var retVal = new CheckPointListDTO();
|
||||
|
||||
Reference in New Issue
Block a user