public CategoriesRepository() { context = new FilmDBContext(ConfigurationManager.ConnectionStrings[0].ConnectionString); }
public FilmDBContext _context; //context instance accessible from anywhere in controller public HomeController(ILogger <HomeController> logger, FilmDBContext filmDBContext) { _logger = logger; _context = filmDBContext; }
public FilmsController(FilmDBContext context) { _context = context; }
public FilmDAO() { dBContext = new FilmDBContext(); }
//constructor for home controller public HomeController(ILogger <HomeController> logger, FilmRepository repository, FilmDBContext con) { _logger = logger; _repository = repository; context = con; }