コード例 #1
0
        public async Task <bool> CreateBook(TbBook book)
        {
            var query = await _context.Database.ExecuteSqlRawAsync(Resources.SpInsertBook,
                                                                   book.Name,
                                                                   book.WriteDate,
                                                                   book.LaunchDate,
                                                                   book.Price,
                                                                   book.IdAuthor,
                                                                   book.IdEditorial,
                                                                   book.Remarks);

            return(query < 0);
        }
コード例 #2
0
        public async Task <bool> UpdateBook(BookDTO book)
        {
            TbBook tbBook = _mapper.Map <TbBook>(book);

            return(await _repository.UpdateBook(tbBook));
        }