public List <Movies> GetMovies() { MoviesEntities1 db = new MoviesEntities1(); List <Movies> movies = db.Movies.ToList(); return(movies); }
public List <MoviesA> GetMovieList() { MoviesEntities1 DB = new MoviesEntities1(); List <MoviesA> Movie = DB.MoviesAs.ToList(); return(Movie); }
public List <Movies> GetMovieByKey(string keyword) { MoviesEntities1 db = new MoviesEntities1(); List <Movies> movie = (from m in db.Movies where m.Title.Contains(keyword) select m).ToList(); return(movie); }
public List <Movies> GetMovieInfo(string id) { MoviesEntities1 db = new MoviesEntities1(); List <Movies> movie = (from m in db.Movies where m.Title == id select m).ToList(); return(movie); }
public List <Movies> GetMovieByGenre(string id) { MoviesEntities1 db = new MoviesEntities1(); List <Movies> movie = (from m in db.Movies where m.Genre.Contains(id) select m).ToList(); return(movie); }
public List <MoviesA> GetMovieByCategory(string cat) { MoviesEntities1 DB = new MoviesEntities1(); List <MoviesA> MovieCat = (from M in DB.MoviesAs where M.Category.Contains(cat) select M).ToList(); return(MovieCat); }
public List <MoviesA> GetRandom() { Random rnd = new Random(); MoviesEntities1 DB = new MoviesEntities1(); List <MoviesA> MovieRnd = DB.MoviesAs.ToList(); int MovieA = MovieRnd.Count() + 1; int MovieRnds = rnd.Next(0, MovieA); return(MovieRnd); }
public Movies GetRandomMovieByGenre(string id) { Random movy = new Random(); MoviesEntities1 db = new MoviesEntities1(); List <Movies> movie = (from m in db.Movies where m.Genre == id select m).ToList(); int RandMovie = movy.Next(0, movie.Count()); return(movie[RandMovie]); }
public Movies GetRandomMovie() { MoviesEntities1 db = new MoviesEntities1(); Random movie = new Random(); int RandMovie = movie.Next(0, db.Movies.Count()); Movies moovie = (from m in db.Movies where m.ID == RandMovie select m).Single(); return(moovie); }
public List <MoviesA> GetRandomByCat(string cat) { Random rnd = new Random(); MoviesEntities1 DB = new MoviesEntities1(); List <MoviesA> MovieCatR = (from M in DB.MoviesAs where M.Category.Contains(cat) select M).ToList(); int MovieA = MovieCatR.Count() + 1; int MovieRnds = rnd.Next(0, MovieA); return(MovieCatR); }
public List <Movies> GetRandomMovieList(int num) { Random rnd = new Random(); MoviesEntities1 db = new MoviesEntities1(); List <Movies> randomMovieList = new List <Movies>(); List <Movies> fullMovieList = db.Movies.ToList(); for (int i = 0; i < num; i++) { int randomNumber = rnd.Next(0, fullMovieList.Count()); randomMovieList.Add(fullMovieList[randomNumber]); } return(randomMovieList); }