Esempio n. 1
0
 public void AddBook(Book book)
 {
     book.CreatedOn = DateTime.UtcNow;
     book.UpdatedOn = DateTime.UtcNow;
     db.Add(book);
     db.SaveChanges();
 }
Esempio n. 2
0
 public void AddBook(Book book)
 {
     _db.Add(book);
     _db.SaveChanges();
 }
Esempio n. 3
0
 public void AddBook(Book book)
 {
     dbContext.Add(book);
     dbContext.SaveChanges();
 }
Esempio n. 4
0
 void IBookService.AddBook(Book book)
 {
     DbContext.Add(book);
     DbContext.SaveChanges();
 }