示例#1
0
        public void UpdateWagon()
        {
            EmptyLists();

            wagonRepository = new WagonRepository(context);
            Wagon wagon = new Wagon(1, "naam", 13, 25);

            Assert.True(wagonRepository.UpdateWagon(wagon));
        }
示例#2
0
 public IActionResult Edit(WagonDetailViewModel vm)
 {
     try
     {
         Wagon wagon = converter.ViewModelToWagon(vm);
         repo.UpdateWagon(wagon);
         return(RedirectToAction("Details", new { wagon.Id }));
     }
     catch
     {
         return(View());
     }
 }