Beispiel #1
0
        public List <Language> GetLanguages()
        {
            DbContextApp db = new DbContextApp();



            return(db.Languages.ToList());
        }
Beispiel #2
0
 public bool Addreview(AddReview data)
 {
     if (data != null)
     {
         Review rev = new Review();
         rev.MovieId = data.MovieId;
         rev.review  = data.review;
         DbContextApp db = new DbContextApp();
         db.Reviews.Add(rev);
         db.SaveChanges();
         return(true);
     }
     return(false);
 }
Beispiel #3
0
        public List <Review> GetReviews(int MovieId)
        {
            DbContextApp db = new DbContextApp();

            return(db.Reviews.Include("movies").Where(a => a.MovieId == MovieId).ToList());
        }
Beispiel #4
0
        public List <Movie> GetMovies(int LanguageId = 0)
        {
            DbContextApp db = new DbContextApp();

            return(db.Movies.Include("Languages").Where(a => a.LanguageId == LanguageId).ToList());
        }