Example #1
0
        public SubCatViewModel()
        {
            catRepo    = new CatRepository();
            subCatRepo = new SubCatRepository();

            cats    = new ObservableCollection <Cat>();
            subCats = new ObservableCollection <SubCat>();
            LoadData();
        }
Example #2
0
 public BookViewModel()
 {
     bookRepo      = new BookRepository();
     catRepo       = new CatRepository();
     subCatRepo    = new SubCatRepository();
     recommendRepo = new RecommendRepository();
     books         = new ObservableCollection <Book>();
     cats          = new ObservableCollection <Cat>();
     subCats       = new ObservableCollection <SubCat>();
     recommendList = new ObservableCollection <Recommend>();
     paging        = new Paging();
     pageList      = new ObservableCollection <int>();
     LoadData(1);
 }
Example #3
0
 public HomeController(BookRepository bookRepo, CatRepository catRepo, SubCatRepository subCatRepo)
 {
     this.bookRepo   = bookRepo;
     this.catRepo    = catRepo;
     this.subCatRepo = subCatRepo;
 }