//method that commits an insert to the table
 public bool commitInsert(string _title, string _main_text, DateTime _event_date )
 {
     ndhDataContext objNews = new ndhDataContext();
     //to ensure all data will be disposed when finished
     using (objNews)
     {
         homenew objNewsItem = new homenew();
         objNewsItem.title = _title;
         objNewsItem.main_text = _main_text;
         objNewsItem.event_date = _event_date;
         objNews.homenews.InsertOnSubmit(objNewsItem);
         objNews.SubmitChanges();
         return true;
     }
 }
 partial void Updatehomenew(homenew instance);
 partial void Deletehomenew(homenew instance);
 partial void Inserthomenew(homenew instance);