private List<Student> GetStudentsFromCommand(SqlCommand command)
        {
            List<Student> studentList = new List<Student>();

            using (SqlDataReader reader = command.ExecuteReader())
            {
                while (reader.Read())
                {
                    Student student = new Student()
                    {
                        ID = (int)reader["PersonID"],
                        LastName = (string)reader["LastName"],
                        FirstName = (string)reader["FirstName"],
                        EnrollmentDate = (DateTime)reader["EnrollmentDate"]
                    };
                    studentList.Add(student);
                }
            }

            return studentList;
        }
 public void AddStudent(Student student)
 {
     throw new NotImplementedException();
 }
        public void UpdateStudent(Student student)
        {
            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                string commandText =
                    @"exec UpdateStudent @PersonID, @LastName, @FirstName, @EnrollmentDate";

                SqlCommand command = new SqlCommand(commandText, connection);
                command.Parameters.Add(
                    new SqlParameter()
                    {
                        ParameterName = "@PersonID",
                        DbType = DbType.Int32,
                        Value = student.ID
                    }
                );
                command.Parameters.Add(
                    new SqlParameter()
                    {
                        ParameterName = "@LastName",
                        DbType = DbType.String,
                        Value = student.LastName
                    }
                );
                command.Parameters.Add(
                    new SqlParameter()
                    {
                        ParameterName = "@FirstName",
                        DbType = DbType.String,
                        Value = student.FirstName
                    }
                );
                command.Parameters.Add(
                    new SqlParameter()
                    {
                        ParameterName = "@EnrollmentDate",
                        DbType = DbType.DateTime,
                        Value = student.EnrollmentDate
                    }
                );
                connection.Open();
                command.ExecuteNonQuery();
            }
        }