Beispiel #1
0
        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;
        }
Beispiel #2
0
 public LoadCommand(FootballTeamsViewModel viewmodel)
 {
     this.viewModel = viewmodel;
 }