/// <summary> /// function that adds a keyword to the specified dictionary /// </summary> /// <param name="dictionary">dictionary to add keyword to</param> /// <param name="phrase">the phrase to add to the dictionary specified</param> /// <param name="slide_num">the number of the slide</param> public void addKeyword(string dictionary, string phrase, int slide_num) { using (var db = new PlanetariumDataContext()) { Dictionary cat = db.Dictionaries.Single(a => a.Type.Equals(dictionary)); Keyword key = new Keyword { Dictionary_ID = cat.Dictionary_ID, Phrase = phrase, Slide_Num = slide_num }; db.Keywords.InsertOnSubmit(key); db.SubmitChanges(); } }
partial void DeleteKeyword(Keyword instance);
partial void InsertKeyword(Keyword instance);
partial void UpdateKeyword(Keyword instance);
private void detach_Keywords(Keyword entity) { this.SendPropertyChanging(); entity.Dictionary = null; }