예제 #1
0
        public async Task <IActionResult> Create([Bind("Id,Naam,KlantId,Bezet")] Reservering reservering)
        {
            if (ModelState.IsValid)
            {
                _context.Add(reservering);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(reservering));
        }
        public async Task <IActionResult> Create([Bind("Id,Naam,Adres,Woonplaats,Email")] Klant klant)
        {
            if (ModelState.IsValid)
            {
                _context.Add(klant);
                await _context.SaveChangesAsync();

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