| @@ -7,6 +7,6 @@ namespace Diligent.WebAPI.Business.Services.Interfaces | |||
| public interface ISelectionLevelService | |||
| { | |||
| Task<List<SelectionLevelResponseWithDataDto>> GetAllAsync(); | |||
| Task<SelectionProcessResposneDto> GetByIdAsync(int id); | |||
| Task<SelectionLevelResposneDto> GetByIdAsync(int id); | |||
| } | |||
| } | |||
| @@ -17,14 +17,14 @@ namespace Diligent.WebAPI.Business.Services | |||
| public async Task<List<SelectionLevelResponseWithDataDto>> GetAllAsync() => | |||
| _mapper.Map<List<SelectionLevelResponseWithDataDto>>(await _context.SelectionLevels.Include(sl => sl.SelectionProcesses).ToListAsync()); | |||
| public async Task<SelectionProcessResposneDto> GetByIdAsync(int id) | |||
| public async Task<SelectionLevelResposneDto> GetByIdAsync(int id) | |||
| { | |||
| var sl = await _context.SelectionLevels.FindAsync(id); | |||
| if (sl is null) | |||
| throw new EntityNotFoundException("Selection level not found"); | |||
| return _mapper.Map<SelectionProcessResposneDto>(sl); | |||
| return _mapper.Map<SelectionLevelResposneDto>(sl); | |||
| } | |||
| } | |||
| @@ -4,8 +4,7 @@ namespace Diligent.WebAPI.Contracts.DTOs.SelectionLevel | |||
| { | |||
| public class SelectionLevelResponseWithDataDto | |||
| { | |||
| public int LevelId { get; set; } | |||
| public int Id { get; set; } | |||
| public string Name { get; set; } | |||
| public SelectionProcessResposneDto SelectionProcesses { get; set; } | |||
| } | |||
| @@ -8,7 +8,7 @@ namespace Diligent.WebAPI.Contracts.DTOs.SelectionLevel | |||
| { | |||
| public class SelectionLevelResposneDto | |||
| { | |||
| public int LevelId { get; set; } | |||
| public int Id { get; set; } | |||
| public string Name { get; set; } | |||
| } | |||
| @@ -10,6 +10,6 @@ namespace Diligent.WebAPI.Contracts.DTOs.SelectionProcess | |||
| public string Status { get; set; } | |||
| public DateTime? Date { get; set; } | |||
| public string? Link { get; set; } | |||
| public ApplicantViewDto Applicant { get; set; } | |||
| //public ApplicantViewDto Applicant { get; set; } | |||
| } | |||
| } | |||
| @@ -12,5 +12,6 @@ | |||
| public int SelectionLevelId { get; set; } | |||
| public SelectionLevel SelectionLevel { get; set; } | |||
| public int ApplicantId { get; set; } | |||
| public Applicant Applicant { get; set; } | |||
| } | |||
| } | |||