public void DodajPost(Klasa new_post) { using (LinqBlogDataContext dp = new LinqBlogDataContext()) { var p = new post(); p.tytul = new_post.tytul; p.tresc = new_post.tresc; p.status = new_post.status; p.data_dodania = DateTime.Now; dp.posts.InsertOnSubmit(p); dp.SubmitChanges(); var t = new tagi(); t.id_posta = p.ID; t.keywords = new_post.keywords; t.description = new_post.description; dp.tagis.InsertOnSubmit(t); dp.SubmitChanges(); } }
partial void Deletetagi(tagi instance);
partial void Updatetagi(tagi instance);
partial void Inserttagi(tagi instance);