コード例 #1
0
 public IActionResult AddCustomer(Customer customer)
 {
     if (ModelState.IsValid)
     {
         customer.IsActive = true;
         repositoryLayer.AddCustomer(customer);
         return(RedirectToAction(nameof(Index)));
     }
     else
     {
         return(View());
     }
 }