Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }