Q: WCF/REST Something is up with my POST? When I POST using my windows form app (second peace of code down) when I go to GET the student collection with buttonclick 2 into my datagrid nothing is showing I can hardcode the members and GET no problem, yet I cant POST? The response I get back says OK in the message box when I click button1 for my post? So not quite sure what I have done...
    [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, UriTemplate = "")]
    void AddStudent(Student student);

            XDocument xDoc = XDocument.Load(uri);
            var students = xDoc.Descendants("Student")
                .Select(n => new
                {
                    StudentNo = n.Element("StudentID").Value,
                    Firstname = n.Element("FirstName").Value,
                    Surname = n.Element("LastName").Value
                })
                .ToList();

            dataGridView1.DataSource = students;
        }


A: Are you running in Per Call Activation mode? If so, every client request gets a new dedicated service instance, so your List<> is being recreated as empty every time.
See this reference article. You'll have to persist your List between calls, either in a Cache or Database.

A: Your AddStudent is not adding to the list
public void AddStudent(Student student)
{
    student.StudentID.ToString();
    student.FirstName.ToString();
    student.LastName.ToString();
}

And GetStudentCollection is returning the same hard coded values.
static List<Student> students = new List<Student>();
public void AddStudent(Student student)
{
   students.Add(student);

}

public List<Student> GetStudentCollection()
{
    return students;
}


A: Your service is doing exactly what you wrote in code. ListStudents constantly returns the same list of the students, AddStudent do nothing with the list. 
