Example #1
0
 public int Commit()
 {
     return(_context.SaveChanges());
 }
 public void Add(Author newAuthor)
 {
     _dbContext.Authors.Add(newAuthor);
     _dbContext.SaveChanges();
 }
 public Post AddPost(Post newPost)
 {
     _dbContext.Posts.Add(newPost);
     _dbContext.SaveChanges();
     return(newPost);
 }