public void AddNoteToStudentByStudentId(NoteFullServiceModel noteToAdd)
 {
     this.db.Notes.Add(new Note
     {
         StatusNote    = (EnumStatusNote)noteToAdd.StatusNote,
         Comment       = noteToAdd.Comment,
         DateReceived  = noteToAdd.DateReceived,
         DateConfirmed = noteToAdd.DateConfirmed,
         StudentId     = noteToAdd.Student.Id,
         SubjectId     = noteToAdd.Subject.Id,
         TeacherId     = noteToAdd.Teacher.Id,
     });
     db.SaveChanges();
 }
        public IActionResult AddNote(NoteFullViewModel noteProfileToAdd, int id)
        {
            var noteProfileServiceModelToAdd = new NoteFullServiceModel
            {
                //Title = noteProfileToAdd.Title,
                //Comment = noteProfileToAdd.Comment,
                //DateReceived = noteProfileToAdd.DateReceived,
                //StatusNote = (int)noteProfileToAdd.StatusNote,
            };

            this.noteService.AddNoteToStudentByStudentId(noteProfileServiceModelToAdd);

            return(this.RedirectToAction("NoteApproved", new { id = id }));
        }