public void Add(Tag tag) { tag.Id = dataContext.Tags.Count() + 1; dataContext.Tags.InsertOnSubmit(tag); dataContext.SubmitChanges(); }
public List<Presentation> Search(Tag tag1) { List<Presentation> resultList1 = new List<Presentation>(); List<TagPresentationLink> tempList = new List<TagPresentationLink>(); List<TagPresentationLink> pretempList = new List<TagPresentationLink>(); foreach (TagPresentationLink link in dataContext.TagPresentationLinks) { if (link.IsActive == true) { pretempList.Add(link); } } foreach (TagPresentationLink link in dataContext.TagPresentationLinks) { if (link.TagId == tag1.Id) { tempList.Add(link); resultList1.Add(GetPresentationById(link.PresentationId)); } } return resultList1; }
partial void UpdateTag(Tag instance);
partial void DeleteTag(Tag instance);
partial void InsertTag(Tag instance);