public List <Language> GetLanguages() { DbContextApp db = new DbContextApp(); return(db.Languages.ToList()); }
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); }
public List <Review> GetReviews(int MovieId) { DbContextApp db = new DbContextApp(); return(db.Reviews.Include("movies").Where(a => a.MovieId == MovieId).ToList()); }
public List <Movie> GetMovies(int LanguageId = 0) { DbContextApp db = new DbContextApp(); return(db.Movies.Include("Languages").Where(a => a.LanguageId == LanguageId).ToList()); }