public void PostResponse(GuestResponse response)
 {
     if (ModelState.IsValid)
     {
         Repository.Add(response);
     }
 }
 public ActionResult Rsvp(GuestResponse response)
 {
     if (ModelState.IsValid)
     {
         Repository.Add(response);
         return View("Thanks", response);
     }
     else
     {
         return View();
     }
 }
Esempio n. 3
0
 public static void Add(GuestResponse newResponse)
 {
     string key = newResponse.Name.ToLowerInvariant();
     if (responses.ContainsKey(key))
     {
         responses[key] = newResponse;
     }
     else
     {
         responses.Add(key, newResponse);
     }
 }