public void InsertOrUpdate(Question question) { if (question.Id == default(int)) { // New entity context.Questions.Add(question); } else { // Existing entity context.Entry(question).State = EntityState.Modified; } }
public HttpResponseMessage Put(int id, Question item) { throw new NotImplementedException(); }