Ejemplo n.º 1
0
        public void Delete(Presentation presentation)
        {
            foreach (Vote vote in dataContext.Votes)
            {
                if (vote.PresentationId == presentation.Id) { Update(vote); }
            }

            foreach (TagPresentationLink link in dataContext.TagPresentationLinks)
            {
                if (link.PresentationId == presentation.Id) { Update(link); }
            }

            Update(presentation);
        }
Ejemplo n.º 2
0
 public void VoteUp(Presentation presentation)
 {
     Vote vote = new Vote();
     Presentation basePresentation = GetPresentationById(presentation.Id);
     basePresentation.Mark += 1;
     dataContext.SubmitChanges();
 }
Ejemplo n.º 3
0
 public void Add(Presentation presentation)
 {
     presentation.Id = dataContext.Presentations.Count() + 1;
     dataContext.Presentations.InsertOnSubmit(presentation);
     dataContext.SubmitChanges();
 }
Ejemplo n.º 4
0
 public void Update(Presentation presentation)
 {
     Presentation basePresentation = GetPresentationById(presentation.Id);
     basePresentation.IsActive = false;
     dataContext.SubmitChanges();
 }
Ejemplo n.º 5
0
 partial void DeletePresentation(Presentation instance);
Ejemplo n.º 6
0
 partial void UpdatePresentation(Presentation instance);
Ejemplo n.º 7
0
 partial void InsertPresentation(Presentation instance);
Ejemplo n.º 8
0
		private void detach_Presentations(Presentation entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Ejemplo n.º 9
0
		private void attach_Presentations(Presentation entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}