// Use this for dependency injection public HomeController(UserInterface iUser, PartnershipNightInterface iPn, CharityInterface iChar, BvLocationInterface iLoc, FormInterface iForm) { uRepo = iUser; pnRepo = iPn; cRepo = iChar; lRepo = iLoc; fRepo = iForm; }
// The default constructor is called by the framework public HomeController() { uRepo = new UserRepository(); pnRepo = new PartnershipNightRepository(); cRepo = new CharityRepository(); lRepo = new BvLocationRepository(); fRepo = new FormRepository(); }
// Use this for dependency injection public HomeController(UserInterface iUser, PartnershipNightInterface iPn, CharityInterface iChar, BvLocationInterface iLoc, StatsInfoInterface iStats) { uRepo = iUser; pnRepo = iPn; cRepo = iChar; lRepo = iLoc; sRepo = iStats; }