public void Add(TagPresentationLink link) { link.Id = dataContext.TagPresentationLinks.Count(); bool temp = true; foreach (TagPresentationLink link1 in dataContext.TagPresentationLinks) { if (link.PresentationId == link1.PresentationId && link.TagId == link1.TagId) { temp = false; } } if (temp) { dataContext.TagPresentationLinks.InsertOnSubmit(link); dataContext.SubmitChanges(); } }
public void Update(TagPresentationLink link) { TagPresentationLink baseLink = GetLinkById(link.Id); baseLink.IsActive = false; dataContext.SubmitChanges(); }
private void detach_TagPresentationLinks(TagPresentationLink entity) { this.SendPropertyChanging(); entity.Tag = null; }
partial void DeleteTagPresentationLink(TagPresentationLink instance);
partial void UpdateTagPresentationLink(TagPresentationLink instance);
partial void InsertTagPresentationLink(TagPresentationLink instance);
private void attach_TagPresentationLinks(TagPresentationLink entity) { this.SendPropertyChanging(); entity.Presentation = this; }