Beispiel #1
0
 public void AddLinkpost(Linkpost linkpost)
 {
     using (var db = new Sova())
     {
         linkpost.linkpostid = db.Linkpost.Max(lp => lp.linkpostid) + 1;
         db.Add(linkpost);
         db.SaveChanges();
     }
 }
Beispiel #2
0
 public void AddPost_tag(Post_tag pt)
 {
     using (var db = new Sova())
     {
         pt.postid = db.Post_tag.Max(p => pt.id) + 1;
         db.Add(pt);
         db.SaveChanges();
     }
 }
Beispiel #3
0
 public void AddHistory(History history)
 {
     using (var db = new Sova())
     {
         history.id = db.HistoryList.Max(h => h.id) + 1;
         db.Add(history);
         db.SaveChanges();
     }
 }
Beispiel #4
0
 public void AddUser(User user)
 {
     using (var db = new Sova())
     {
         user.id = db.User.Max(u => u.id) + 1;
         db.Add(user);
         db.SaveChanges();
     }
 }
Beispiel #5
0
 public void AddComment(Comment comment)
 {
     using (var db = new Sova())
     {
         comment.id = db.Comments.Max(c => c.id) + 1;
         db.Add(comment);
         db.SaveChanges();
     }
 }
Beispiel #6
0
 public void AddPost(Post post)
 {
     using (var db = new Sova())
     {
         post.id = db.Posts.Max(p => p.id) + 1;
         db.Add(post);
         db.SaveChanges();
     }
 }
Beispiel #7
0
 public void AddTags(Tags tags)
 {
     using (var db = new Sova())
     {
         tags.id = db.Tags.Max(ta => ta.id) + 1;
         db.Add(tags);
         db.SaveChanges();
     }
 }