Beispiel #1
0
        public async Task <IActionResult> Create([Bind("ID,FirstName,LastName,Address_1,Address_2,City,State,ZipCode,Neighborhood")] Customer customer)
        {
            if (ModelState.IsValid)
            {
                _context.Add(customer);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(customer));
        }
 public ActionResult Create(Client new_client)
 {
     _dataBase.Add(new_client);
     _dataBase.SaveChanges();
     return(RedirectToAction("Index"));
 }