Example #1
0
        public void insert(Comment comment)
        {
            ForumContext context = getContext();

            context.Comment.Add(comment);
            context.SaveChanges();
        }
Example #2
0
        public void insert(User user)
        {
            ForumContext context = getContext();

            context.User.Add(user);
            context.SaveChanges();
        }
Example #3
0
 public void insert(Topic topic)
 {
     using (var context = new ForumContext())
     {
         context.Topic.Add(topic);
         context.SaveChanges();
         context.Dispose();
     }
 }