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;
}