public IActionResult OnPostAsync()
 {
     if (!ModelState.IsValid)
     {
         return(Page());
     }
     //Add
     CustomerStore.EditCustomer(Customer);
     return(RedirectToPage("./Index"));
 }
 public IActionResult OnPostAsync()
 {
     //Edit
     if (!ModelState.IsValid)
     {
         return(Page());
     }
     Customer.BornDate = Convert.ToDateTime(BornDate);
     CustomerStore.EditCustomer(Customer);
     return(RedirectToPage("./Index"));
 }
 public IActionResult EditCustomer(int id, Customer customer)
 {
     cs.EditCustomer(id, customer);
     return(Ok());
 }