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



            return(db.Languages.ToList());
        }
示例#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);
 }
示例#3
0
        public List <Review> GetReviews(int MovieId)
        {
            DbContextApp db = new DbContextApp();

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

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