public Student CreateStudent(Student createStudent) { //desarrollamos el metodo de creacion de perosna createStudent.ID = (++studentCount).ToString(); objStudent.Add(createStudent); return createStudent; }
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; }