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); }
public HttpResponseMessage PostStudent(Student st) { data.Add(st); return new HttpResponseMessage(System.Net.HttpStatusCode.OK); }