I have a class called student that inherits from a person class. I wanted to update the student's name only so I created a method in my person repository called Update(Person p) that accepts a person.
public string Name;
public Student : Person
public string StudentID
public void Update(Person p)
xxx some where in my program xxx
Student student = Repository.GetStudent();
student.Name = "Jack";
I know that the Update method will contain a person object that I can interact with but HOW is the data being sent to the repository? Does the student object get sent to the repository or does .Net automatically extract the Person object from the Student object then sends it to the repository?