public MovieCreateViewModel()
 {
     var context = new MovieContext();
     this.Studios = context.Studios.ToList();
     this.Directors = context.People.ToList();
     this.MaleLeads = context.People.ToList();
     this.FemaleLeads = context.People.ToList();
 }
Example #2
0
 public ActionResult Index()
 {
     var context = new MovieContext();
     return View(context.Movies.Include("Studio").Include("LeadMaleActor").
         Include("LeadFemaleActress").ToList());
 }