Пример #1
0
        public async Task <Category> InsertCategory(Category obj)
        {
            _dbContext.Add(obj);
            await _dbContext.SaveChangesAsync();

            return(obj);
        }
Пример #2
0
        public async Task <Book> Insert(Book book)
        {
            _dbContext.Add(book);
            await _dbContext.SaveChangesAsync();

            return(book);
        }