public ActionResult DetailView(int id) { Materiaal materiaal = materiaalRepository.FindById(id); factory = new MaterialenViewModelFactory(); return(PartialView("Detail", factory.CreateMateriaalViewModel(materiaal) as MateriaalViewModel)); }
public ActionResult ReservatieDetails(Gebruiker gebruiker, int id, int week) { Materiaal materiaal = materiaalRepository.FindById(id); factory = new ReservatieDetailViewModelFactory(); var map = materiaal.ReservatieDetails(week); //Map converteren Dictionary <DateTime, IEnumerable <ReservatieDetailViewModel> > vmMap = map.ToDictionary ( d => d.Key, d => d.Value.Select(v => factory.CreateReservatieDetailViewModel(v) as ReservatieDetailViewModel) ); return(PartialView("DetailReservaties", factory.CreateReservatiesViewModel(vmMap, materiaal, week, dtfi) as ReservatiesDetailViewModel)); }