示例#1
0
 public Student CreateStudent(Student createStudent)
 {
     //desarrollamos el metodo de creacion de perosna
     createStudent.ID = (++studentCount).ToString();
     objStudent.Add(createStudent);
     return createStudent;
 }
示例#2
0
 public Student UpdateStudent(string id, Student updateStudent)
 {
     //desarrollamos el actualizar perosna mandamos el id y losdatos de la persona a actualizar
     Student s = objStudent.FirstOrDefault(e => e.ID.Equals(id));
     s.Name = updateStudent.Name;
     s.Name = updateStudent.Lastname;
     s.Age = updateStudent.Age;
     return s;
 }