Esempio n. 1
0
        private void Populate()
        {
            var authorProvider = new AuthorProvider();
            var categoryProvider = new BookCategoryProvider();

            var t = Task.Factory.StartNew(() => categoryProvider.GetBookCategories());
            var t2  = Task.Factory.StartNew(() => authorProvider.GetAuthors());

            Task.WaitAll(t, t2);

            Categories = t.Result.Result.ToList();
            Authors = t2.Result.Result.ToList();
        }
Esempio n. 2
0
 public ManageController()
 {
     _bookProvider = new BookProvider();
     _authorProvider = new AuthorProvider();
     _categoryProvider = new BookCategoryProvider();
 }