public IActionResult Create(PerronDetailViewModel vm) { if (ModelState.IsValid) { Perron p = converter.ViewModelToPerron(vm); long id = repo.CreatePerron(p); return(RedirectToAction("Details", new { id })); } return(View()); }
public void CreateStation() { EmptyLists(); stationVerbindingRepository = new PerronRepository(context); Perron perron = new Perron(4, "naam", false); Assert.Equal(4, stationVerbindingRepository.CreatePerron(perron)); }