Ver código fonte

Fixed bug

feature/1593_selection_process_BE
Safet Purkovic 3 anos atrás
pai
commit
5c18812563

+ 1
- 1
Diligent.WebAPI.Business/Services/Interfaces/ISelectionLevelService.cs Ver arquivo

@@ -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);
}
}

+ 2
- 2
Diligent.WebAPI.Business/Services/SelectionLevelService.cs Ver arquivo

@@ -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);

}
}

+ 1
- 2
Diligent.WebAPI.Contracts/DTOs/SelectionLevel/SelectionLevelResponseWithDataDto.cs Ver arquivo

@@ -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; }
}

+ 1
- 1
Diligent.WebAPI.Contracts/DTOs/SelectionLevel/SelectionLevelResposneDto.cs Ver arquivo

@@ -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; }
}

+ 1
- 1
Diligent.WebAPI.Contracts/DTOs/SelectionProcess/SelectionProcessResposneDto.cs Ver arquivo

@@ -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; }
}
}

+ 1
- 0
Diligent.WebAPI.Data/Entities/SelectionProcess.cs Ver arquivo

@@ -12,5 +12,6 @@
public int SelectionLevelId { get; set; }
public SelectionLevel SelectionLevel { get; set; }
public int ApplicantId { get; set; }
public Applicant Applicant { get; set; }
}
}

Carregando…
Cancelar
Salvar