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