示例#1
0
 public IActionResult RsvpForm(GuestResponse guestResponse)
 {
     if (ModelState.IsValid)
     {
         FakeDb.AddResponse(guestResponse);
         return(View("Thanks", guestResponse)); // Thanks.cshtml
     }
     else
     {
         return(View());
     }
 }
示例#2
0
 public IActionResult Edit(UserResponse r)
 {
     if (ModelState.IsValid)
     {
         FakeDb.AddResponse(r);
         return(View("Details", r));
     }
     else
     {
         return(View(r));
     }
 }