async Task FilmsTresholdReached()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                pageNumber++;
                if (pageNumber > pagesCount)
                {
                    FilmTreshold = -1;
                    return;
                }
                var films = await filmService.GetAllFilms(pageNumber);

                FilteredFilms.AddRange(films);
                Films.AddRange(films);
            }
            finally
            {
                IsBusy = false;
            }
        }
示例#2
0
        static void Main(string[] args)
        {
            FilmService filmService = new FilmService();

            var listing = filmService.GetAllFilms();

            foreach (var item in listing)
            {
                Console.WriteLine(item.title);
            }


            LanguageService languageService = new LanguageService();

            //var newLanguage = new Language
            //{
            //    name = "Bangla",
            //    last_update=DateTime.Now

            //};

            //languageService.Add(newLanguage);


            var updateLanguage = new Language
            {
                language_id = 7,
                name        = "Bengali",
                last_update = DateTime.Now
            };

            languageService.Update(updateLanguage);

            Console.ReadKey();
        }
示例#3
0
        public ActionResult Index()
        {
            FilmService filmService = new FilmService();

            var listing = filmService.GetAllFilms();

            var model = new FilmListViewModel
            {
                Films = listing
            };


            //LanguageService languageService = new LanguageService();

            //var newLanguage = new Language
            //{
            //    name = "Bangla",
            //    last_update=DateTime.Now

            //};

            //languageService.Add(newLanguage);


            //var updateLanguage = new Language
            //{
            //    language_id = 7,
            //    name = "Bengali",
            //    last_update = DateTime.Now

            //};

            //languageService.Update(updateLanguage);

            return(View(model));
        }
示例#4
0
 public ActionResult Index()
 {
     return(View(FilmService.GetAllFilms(User.Identity.GetUserId())));
 }