public Cast(string n, int ind) { actorRepo = new SqlActorRepository(connectionString); movieRepo = new SqlMovieRepository(connectionString); reviewRepo = new SqlReviewRepository(connectionString); showtimeRepo = new SqlShowTimeRepository(connectionString); ticketRepo = new SqlTicketRepository(connectionString); viewerRepo = new SqlViewerRepository(connectionString); InitializeComponent(); index = ind; name = n; index = ind; name = movieRepo.FetchMovie(ind).Name; label1.Text = name; IReadOnlyList <Actor> actors = actorRepo.FetchActorOnMovie(ind); foreach (Actor a in actors) { listBox1.Items.Add(a.Name); } }