public async Task <IActionResult> Edit(int id, [Bind("ZoektermId,ActionId")] ZoektermAction zoektermAction)
        {
            if (id != zoektermAction.ZoektermId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(zoektermAction);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ZoektermActionExists(zoektermAction.ZoektermId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ActionId"]   = new SelectList(_context.Action, "Id", "Id", zoektermAction.ActionId);
            ViewData["ZoektermId"] = new SelectList(_context.Zoekterm, "Id", "Id", zoektermAction.ZoektermId);
            return(View(zoektermAction));
        }
        public async Task <IActionResult> Create([Bind("ZoektermId,ActionId")] ZoektermAction zoektermAction)
        {
            if (ModelState.IsValid)
            {
                _context.Add(zoektermAction);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ActionId"]   = new SelectList(_context.Action, "Id", "Id", zoektermAction.ActionId);
            ViewData["ZoektermId"] = new SelectList(_context.Zoekterm, "Id", "Id", zoektermAction.ZoektermId);
            return(View(zoektermAction));
        }