public ActionResult Salle() { ISalleService scv = new SalleService(); IProjectionService pcv = new ProjectionService(); List <Salle> salles = scv.GetMany().ToList(); foreach (var item in salles) { item.Projections = pcv.GetMany(p => p.SalleId == item.SalleId).ToList(); } return(View(salles)); }
public ActionResult TopFilm() { List <Film> films = filmService.GetMany(f => f.FilmNote >= 4).ToList(); IProjectionService pcv = new ProjectionService(); foreach (var item in films) { item.Projections = pcv.GetMany(p => p.FilmId == item.FilmId).ToList(); item.Categories = filmService.GetFilmCategories(item.FilmId).ToList(); } return(PartialView(films)); }