public void UpdateStatus(int MovieID, int userID, int Status) { MovieTransitionTable movie = db.MovieTransitionTables.Where(x => x.UserID == userID).Where(x => x.MovieID == MovieID).Single(); movie.StatusID = Status; db.SaveChanges(); }
public void addNew(int MovieID, int userID) { MovieTransitionTable newElement = new MovieTransitionTable(); newElement.MovieID = MovieID; newElement.StatusID = 1; newElement.UserID = userID; newElement.isDeleted = false; db.MovieTransitionTables.Add(newElement); db.SaveChanges(); }