Example #1
0
 public IActionResult OnPost()
 {
     if (ModelState.IsValid)
     {
         _customerData.CreateCustomer(Customer);
         _customerData.CommitChanges();
         return(RedirectToPage("/Customers/Index"));
     }
     else
     {
         return(RedirectToPage(Customer));
     }
 }