Exemplo n.º 1
0
        public ActionResult Edit(int id)
        {
            int studentId = id;
            var student = _serviceStudent.GetById(studentId);
            int teacherId= student.EmployeeHistories.OrderByDescending(x=> x.Date).FirstOrDefault().EmployeeId;
            
            TeacherLogModel teacherLogModel = new TeacherLogModel()
            {
                Description= _serviceTeacherChange.GetByTeacherId(teacherId).Description,
                StudentId = student.Id,
                TeacherId = teacherId,
                ModifiedDate = DateTime.Now,
                Teachers = _serviceTeacher.GetAll().ToList()
            };            

            return View(teacherLogModel);
        }
Exemplo n.º 2
0
        public async Task <IEnumerable <EmployeeDto> > GetAll()
        {
            var result = await _service.GetAll();

            return(_mapper.Map <IEnumerable <EmployeeDto> >(result));
        }