public async Task <IActionResult> Index()
        {
            var addresses = _dbContext.Addresses
                            .Include(address => address.Students);

            var students = _dbContext.Students
                           .Include(student => student.Address)
                           .Include(student => student.Exams)
                           .ThenInclude(exam => exam.Exam);

            var exams       = _dbContext.Exams;
            var transcripts = _dbContext.Transcripts;

            var t = _service.GetTranscript(2, 1);
            var a = _service.GetTranscripts();

            var tDTO = new TranscriptDTO
            {
                ExamId    = 1,
                StudentId = 5,
                Points    = 30
            };

            t           = _service.SaveTranscript(tDTO);
            tDTO.Points = 60;

            t = _service.PutPoints(t.Id, tDTO);

            _service.DeleteTranscript(t.Id);

            return(View());
        }
Ejemplo n.º 2
0
 public TranscriptDTO PutPoints([FromRoute] int id, [FromBody] TranscriptDTO transcriptObject)
 {
     return(_service.PutPoints(id, transcriptObject));
 }