コード例 #1
0
 public async Task SalvarAsync(RelatorioSemestralTurmaPAP relatorioSemestral)
 {
     if (relatorioSemestral.Id > 0)
     {
         await database.Conexao.UpdateAsync(relatorioSemestral);
     }
     else
     {
         relatorioSemestral.Id = (long)await database.Conexao.InsertAsync(relatorioSemestral);
     }
 }
コード例 #2
0
 public async Task SalvarAsync(RelatorioSemestralTurmaPAP relatorioSemestral)
 => await repositorioRelatorioSemestral.SalvarAsync(relatorioSemestral);
        private RelatorioSemestralAlunoDto ConverterParaDto(RelatorioSemestralPAPAluno relatorioAluno, RelatorioSemestralTurmaPAP relatorioTurma)
        {
            var dto = new RelatorioSemestralAlunoDto()
            {
                RelatorioSemestralAlunoId = relatorioAluno?.Id ?? 0,
                RelatorioSemestralId      = relatorioTurma?.Id ?? 0
            };

            if (relatorioAluno != null)
            {
                dto.Auditoria = (AuditoriaDto)relatorioAluno;
            }

            return(dto);
        }