Exemple #1
0
 public int AddBook(Book book)
 {
     db.Books.Add(book);
     db.SaveChanges();
     return(book.Id);
 }
 public void Save() => context.SaveChanges();
 public int AddAuthor(Author author)
 {
     db.Authors.Add(author);
     db.SaveChanges();
     return(author.Id);
 }