public IActionResult Klant(int id) { Klant klant = klantContainer.GetByID(id); KlantViewModel klantModel = KlantMapper.KlantViewModelWithOrders(klant); return(View(klantModel)); }
public IActionResult Create(KlantViewModel klantModel) { Klant newKlant = KlantMapper.Klant(klantModel); klantContainer.AddNew(newKlant); List <KlantViewModel> klantViewModels = KlantMapper.AllKlantViewModels(); return(RedirectToAction("Index", klantViewModels)); }
public IActionResult Edit(KlantViewModel klantModel) { Klant klant = KlantMapper.Klant(klantModel); klant.Update(); klant = klantContainer.GetByID(klant.id); klantModel = KlantMapper.KlantViewModelWithOrders(klant); return(RedirectToAction("Klant", klantModel)); }
public KlantDataService() { _context = new StomerijBasiliekEntities(); _klantMapper = new KlantMapper(); }
public IActionResult Index() { List <KlantViewModel> klantViewModels = KlantMapper.AllKlantViewModels(); return(View(klantViewModels)); }