public FeedbackDetail Review(string name) { FeedbackDetail feedback = store.Find(entry => entry.Name == name); if (feedback == null) { throw new WebFaultException(System.Net.HttpStatusCode.NotFound); } return(feedback); }
public string Submit(FeedbackDetail detail) { FeedbackDetail feedback = store.Find(entry => entry.Name == detail.Name); string action; if (feedback == null) { store.Add(detail); action = "Accepted"; } else { feedback.Text = detail.Text; action = "Modified"; } return(action); }