예제 #1
0
        public void Update(long id, StudentParam param)
        {
            Model.Student oldEntity = Dao.Find(id);

            if (oldEntity != null)
            {
                Dao.Delete(oldEntity);
                Dao.Update(ParamConverter.Convert(param, null));
            }
            else
            {
                Console.WriteLine($"No entity with Id = {id}  was found");
            }
        }
예제 #2
0
        public StudentDto Update(StudentDto student)
        {
            var entity = ToStudent(student);
            var result = _studentDao.Update(entity);

            return(ToStudentDto(result));
        }
예제 #3
0
 public void EditStudent(Student student)
 {
     studentDao.Update(student);
     ShowData(studentDao.GetAll());
 }