Example #1
0
 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());
 }
Example #2
0
        public void CreateStation()
        {
            EmptyLists();

            stationVerbindingRepository = new PerronRepository(context);
            Perron perron = new Perron(4, "naam", false);



            Assert.Equal(4, stationVerbindingRepository.CreatePerron(perron));
        }