title: Inherit, Repository, MVC
body: <p>I have a StartController that contains a list of movies in a repository. I want to use that list, not only in StartController but in my GenreController but I can't figure out how.
  This is my StartController:</p>
  
  <pre><code>namespace IMDB
  {
      public class StartController : Controller
      {
          // GET: Start
          public ActionResult Index()
          {
  
              var movies = GetMoviesFromRepository();
  
              return View(movies);
          }
          // GET: Details
  
          public ActionResult Movie(int id)
          {
              var allMovies = GetMoviesFromRepository();
              var movie = allMovies.FirstOrDefault(x =&gt; x.MovieID.Equals(id));
  
              return View(movie);
          }
  
          private List&lt;Movie&gt; GetMoviesFromRepository()
          {
  
              var movies = new List&lt;Movie&gt;();
  
              var movie1 = new Movie();
              movie1.MovieID = 1;
              movie1.Title = "Terminator";
              movie1.Genre = "Comedy";
              movie1.Year = 1984;
              movie1.Country = "America";
              movie1.Picture = "http://vignette4.wikia.nocookie.net/tvdatabase/images/8/89/Terminator_(1984).jpg";
              movies.Add(movie1);
  
              var movie2 = new Movie();
              movie2.MovieID = 2;
              movie2.Title = "Terminator 2: Judgement Day";
              movie2.Genre = "Romantic";
              movie2.Year = 1991;
              movie2.Country = "America";
              movie2.Picture = "https://upload.wikimedia.org/wikipedia/en/8/85/Terminator2poster.jpg";
              movies.Add(movie2);
  
              return movies;
          }
      }
  }    
  </code></pre>
  
  <p>And this is the GenreController where I want to access the list from StartController:</p>
  
  <pre><code>namespace IMDB.Controllers
  {
      public class GenreController : Controller
      {
          // GET: Genre
          public ActionResult Genre(string genre)
          {
              var allGenres = GetMoviesFromRepository();
              // Some code goes here
  
              return View();
          }
      }
  }
  </code></pre>
  
  <p>Obviously this isn't working. But I can't figure out how to get my list to work in GenreController.</p>