示例#1
0
        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();

                }
        }
示例#2
0
 partial void Deletetagi(tagi instance);
示例#3
0
 partial void Updatetagi(tagi instance);
示例#4
0
 partial void Inserttagi(tagi instance);