Exemplo n.º 1
0
        public imdbController(imdbContext context)
        {
            _context = context;

            if (_context.Movies.Count() == 0)
            {
                _context.Movies.Add(new Movie {
                    Tittle = "Friends", MovieYear = 2001, Description = "NY city apartament without black people", RunTime = "1000plus hours"
                });
                _context.Movies.Add(new Movie {
                    Tittle = "GodFather", MovieYear = 1971, Description = "Italian Mafia in US", RunTime = "3 amazing hours"
                });
                _context.Movies.Add(new Movie {
                    Tittle = "Memento", MovieYear = 2004, Description = "To much hard detective", RunTime = "2 hours"
                });
                _context.SaveChanges();
            }
        }
Exemplo n.º 2
0
 public MediaController(imdbContext sampleODataDbContext)
 {
     _appDbContext = sampleODataDbContext;
 }
Exemplo n.º 3
0
 public StaffController(imdbContext sampleODataDbContext)
 {
     _appDbContext = sampleODataDbContext;
 }