public Book Create(Book entity)
        {
            context.Add(entity);
            context.SaveChanges();

            return(entity);
        }
示例#2
0
        public Author Create(Author entity)
        {
            context.Add(entity);
            context.SaveChanges();

            return(entity);
        }
 public void Create(Book book)
 {
     _dbContext.Books.Add(book);
     _dbContext.SaveChanges();
 }
示例#4
0
 public void Create(Order order)
 {
     _dbContext.Orders.Add(order);
     _dbContext.SaveChanges();
 }