예제 #1
0
        public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,Address,Discount")] Customer customer)
        {
            if (ModelState.IsValid)
            {
                await _customers.AddAsync(customer);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(customer));
        }