Beispiel #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();
            }
        }
Beispiel #2
0
 partial void Deletetagi(tagi instance);
Beispiel #3
0
 partial void Updatetagi(tagi instance);
Beispiel #4
0
 partial void Inserttagi(tagi instance);