示例#1
0
        public async Task AddBookAsync(BookModel bookModel)
        {
            Book book = (Book)bookModel.Clone();

            book.CreatedOn  = DateTime.UtcNow;
            book.UpddatedOn = DateTime.UtcNow;

            await context.AddAsync(book);

            await context.SaveChangesAsync();
        }