public void Add(Seen seen) { Seen tempSeen = GetSeen(seen.MovieID, seen.UserID); if (tempSeen == null) { SeenMovies.Add(seen.MovieID); } }
//Insert/Delete public void Add(Seen seen) { Seen tempSeen = GetSeen(seen.MovieID, seen.UserID); if (tempSeen == null) { db.Seens.InsertOnSubmit(seen); } }
public ActionResult SeenMovie(int id) { Seen seen = new Seen(); seen.MovieID = id; seen.UserID = User.Identity.Name; _seenRepository.Add(seen); _seenRepository.Save(); BadgeRepository badgeRepository = new BadgeRepository(); badgeRepository.CheckForBadges(User.Identity.Name); return Content("Got it!"); }
private void detach_Seens(Seen entity) { this.SendPropertyChanging(); entity.Movie = null; }
private void attach_Seens(Seen entity) { this.SendPropertyChanging(); entity.Movie = this; }
partial void DeleteSeen(Seen instance);
partial void UpdateSeen(Seen instance);
partial void InsertSeen(Seen instance);
public void Delete(Seen seen) { if (SeenMovies.Contains(seen.ID)) SeenMovies.Remove(seen.ID); }
public void Delete(Seen seen) { db.Seens.DeleteOnSubmit(seen); }