public int Insert(string Name) { try { Khabardaan.Code.DAL.KeywordsDataContext dc = new Khabardaan.Code.DAL.KeywordsDataContext(); Khabardaan.Code.DAL.Keywords NewKeyword = new Khabardaan.Code.DAL.Keywords(); dc.Keywords.InsertOnSubmit(NewKeyword); NewKeyword.Name = Name; dc.SubmitChanges(); return(NewKeyword.Code); } catch { return(0); } }