コード例 #1
0
        public void All_OK()
        {
            IEnumerable <FootballClub> result = instance.All();

            Assert.IsNotNull(result);
            Assert.IsTrue(result.Count() > 0);
        }
コード例 #2
0
        public MainViewModel(IDisconGenericRepository <FootballClub> repository)
        {
            ////if (IsInDesignMode)
            ////{
            ////    // Code runs in Blend --> create design time data.
            ////}
            ////else
            ////{
            ////    // Code runs "for real"
            ////}

            _repository = repository;

            Data = new ObservableCollection <FootballClub>(_repository.All());
        }
コード例 #3
0
        // GET: FootballClubs
        public ActionResult Index()
        {
            var model = _repository.All();

            return(View(model));
        }