// PUT api/default1/5 public int Put(Person person) { Person personInDB = entity.People.First(p => p.ID == person.ID); entity.People.Remove(personInDB); entity.People.Add(person); return entity.SaveChanges(); }
public int Post(Person p) { entity.People.Add(p); return entity.SaveChanges(); }