private KeukenhofWebsiteContext GetInMemoryDBMetData() { KeukenhofWebsiteContext context = GetNewInMemoryDatabase(true); context.Add(new Content { ContentId = 1, Titel = "Text-Links", Tekst = "hallo ik ben text en ik sta links" }); context.Add(new Content { ContentId = 2, Titel = "Titel", Tekst = "Dit is een titel" }); context.Add(new Content { ContentId = 3, Titel = "Lezen", Tekst = "Lees Meer" }); context.SaveChanges(); context = GetNewInMemoryDatabase(false); return(context); }
private KeukenhofWebsiteContext GetInMemoryDBMetData() { KeukenhofWebsiteContext context = GetNewInMemoryDatabase(true); context.Add(new QenA { AnswerId = 1, Question = "Welke kleur is blauw?", Answer = "Blauw" }); context.Add(new QenA { AnswerId = 2, Question = "Welke kaas is blauw?", Answer = "Red" }); context.Add(new QenA { AnswerId = 3, Question = "Welke kleur is Miauw?", Answer = "Miauw" }); context.SaveChanges(); context = GetNewInMemoryDatabase(false); return(context); }
private KeukenhofWebsiteContext GetInMemoryDBMetData() { KeukenhofWebsiteContext context = GetNewInMemoryDatabase(true); context.Add(new Pagina { PaginaId = 1, Titel = "Gele Pagina" }); context.Add(new Pagina { PaginaId = 2, Titel = "Derde Pagina?" }); context.Add(new Pagina { PaginaId = 3, Titel = "Miauw Pagina?" }); context.SaveChanges(); context = GetNewInMemoryDatabase(false); return(context); }
public async Task <IActionResult> Create([Bind("PaginaId,Titel")] Pagina pagina) { if (ModelState.IsValid) { _context.Add(pagina); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(pagina)); }
public async Task <IActionResult> Create([Bind("Id,PagAction,pagTitle")] Action action) { if (ModelState.IsValid) { _context.Add(action); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(action)); }
public async Task <IActionResult> Create([Bind("AnswerId,Question,Answer")] QenA qenA) { if (ModelState.IsValid) { _context.Add(qenA); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(qenA)); }
public async Task <IActionResult> Create([Bind("Naam,Openingsdag,Sluitingsdag,OpeningstijdMaandag,SluitingstijdMaandag,OpeningstijdDinsdag,SluitingstijdDinsdag,OpeningstijdWoensdag,SluitingstijdWoensdag,OpeningstijdDonderdag,SluitingstijdDonderdag,OpeningstijdVrijdag,SluitingstijdVrijdag,OpeningstijdZaterdag,SluitingstijdZaterdag,OpeningstijdZondag,SluitingstijdZondag")] Park park) { if (ModelState.IsValid) { _context.Add(park); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(park)); }
public async Task <IActionResult> Create([Bind("ContentId,Titel,Tekst")] Content content) { if (ModelState.IsValid) { _context.Add(content); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(content)); }
public async Task <IActionResult> Create([Bind("AdminId,Username,FirstName,MiddleName,LastName")] Admin admin) { if (ModelState.IsValid) { _context.Add(admin); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(admin)); }
public async Task <IActionResult> Create([Bind("Id,ZoektermString")] Zoekterm zoekterm) { if (ModelState.IsValid) { _context.Add(zoekterm); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(zoekterm)); }
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)); }