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; } }
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(); }
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)); }
public ActionResult Index() { return(View(FilmService.GetAllFilms(User.Identity.GetUserId()))); }