示例#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());
 }