Example #1
0
 public HttpResponseMessage DeleteStudent(Student st)
 {
     var elem = data.Where(q => q.id == st.id);
     if (elem.Count() > 0)
     {
         data.Remove(elem.First());
         return new HttpResponseMessage(System.Net.HttpStatusCode.OK);
     }
     return new HttpResponseMessage(System.Net.HttpStatusCode.NotFound);
 }
Example #2
0
 public HttpResponseMessage PostStudent(Student st)
 {
     data.Add(st);
     return new HttpResponseMessage(System.Net.HttpStatusCode.OK);
 }