public void Add(Vote vote) { dataContext.Votes.InsertOnSubmit(vote); dataContext.SubmitChanges(); }
public void Update(Vote vote) { Vote baseVote = GetVoteById(vote.Id); baseVote.IsActive = false; dataContext.SubmitChanges(); }
public void VoteUp(Presentation presentation) { Vote vote = new Vote(); Presentation basePresentation = GetPresentationById(presentation.Id); basePresentation.Mark += 1; dataContext.SubmitChanges(); }
partial void UpdateVote(Vote instance);
partial void DeleteVote(Vote instance);
partial void InsertVote(Vote instance);
private void detach_Votes(Vote entity) { this.SendPropertyChanging(); entity.Presentation = null; }
private void attach_Votes(Vote entity) { this.SendPropertyChanging(); entity.Presentation = this; }
private void detach_Votes(Vote entity) { this.SendPropertyChanging(); entity.User = null; }
private void attach_Votes(Vote entity) { this.SendPropertyChanging(); entity.User = this; }