Example #1
0
 public void Add(Vote vote)
 {
     dataContext.Votes.InsertOnSubmit(vote);
     dataContext.SubmitChanges();
 }
Example #2
0
 public void Update(Vote vote)
 {
     Vote baseVote = GetVoteById(vote.Id);
     baseVote.IsActive = false;
     dataContext.SubmitChanges();
 }
Example #3
0
 public void VoteUp(Presentation presentation)
 {
     Vote vote = new Vote();
     Presentation basePresentation = GetPresentationById(presentation.Id);
     basePresentation.Mark += 1;
     dataContext.SubmitChanges();
 }
Example #4
0
 partial void UpdateVote(Vote instance);
Example #5
0
 partial void DeleteVote(Vote instance);
Example #6
0
 partial void InsertVote(Vote instance);
Example #7
0
		private void detach_Votes(Vote entity)
		{
			this.SendPropertyChanging();
			entity.Presentation = null;
		}
Example #8
0
		private void attach_Votes(Vote entity)
		{
			this.SendPropertyChanging();
			entity.Presentation = this;
		}
Example #9
0
		private void detach_Votes(Vote entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Example #10
0
		private void attach_Votes(Vote entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}