public void UpdateWagon() { EmptyLists(); wagonRepository = new WagonRepository(context); Wagon wagon = new Wagon(1, "naam", 13, 25); Assert.True(wagonRepository.UpdateWagon(wagon)); }
public IActionResult Edit(WagonDetailViewModel vm) { try { Wagon wagon = converter.ViewModelToWagon(vm); repo.UpdateWagon(wagon); return(RedirectToAction("Details", new { wagon.Id })); } catch { return(View()); } }