private void MimicIOCContainer() { //Here we can choose which instance to instatntiate .e.g instead of FootballTeamsRepository //we could have chosen MockFootballTeamsRepository IFootballTeamsRepository footballTeamsRepository = new FootballTeamsRepository(); // IFootballTeamsRepository footballTeamsRepository = new MockFootballTeamsRepository(); footballTeamsRepository.DataSource = ConfigurationManager.AppSettings["FootballDBlocation"]; IFootBallTeamService footballBl = new FootBallTeamService(footballTeamsRepository); footballTeamsViewModel = new FootballTeamsViewModel(); footballTeamsViewModel.FootBallTeamService = footballBl; }
public LoadCommand(FootballTeamsViewModel viewmodel) { this.viewModel = viewmodel; }