Exemple #1
0
        public async Task <Deck> Add(Deck deck)
        {
            await _dbContext.Deck.AddAsync(deck);

            await _dbContext.SaveChangesAsync();

            return(deck);
        }
Exemple #2
0
        public Task DeleteDeckCardsByDeckId(long deckId)
        {
            _dbContext.DeckCard.RemoveRange(from dc in _dbContext.DeckCard where dc.DeckId == deckId select dc);

            return(_dbContext.SaveChangesAsync());
        }