public HttpResponseMessage Postperson(clperson person) { clperson personAUX; person.Id = personList.Count + 1; personList.Add(person); return(Request.CreateResponse(HttpStatusCode.OK, person)); }
public HttpResponseMessage Putperson(int id, clperson person) { clperson personAUX; personAUX = personList.Where(x => x.Id == id).FirstOrDefault(); if (personAUX != null) { personAUX.FirstName = person.FirstName; personAUX.LastName = person.LastName; } return(new HttpResponseMessage(HttpStatusCode.OK)); }