Exemplo n.º 1
0
 public void AddComment(Comment comment)
 {
     using var ctx = new BlogDataContext(_connectionString);
     ctx.Comments.Add(comment);
     ctx.SaveChanges();
 }
Exemplo n.º 2
0
 public void AddPost(Post post)
 {
     using var ctx = new BlogDataContext(_connectionString);
     ctx.Posts.Add(post);
     ctx.SaveChanges();
 }