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