public async Task <T> AddAsync(T entity)
        {
            _dbContext.Set <T>().Add(entity);
            await _dbContext.SaveChangesAsync();

            return(entity);
        }
Exemplo n.º 2
0
        public virtual async Task <T> AddAsync(T entity)
        {
            // Movie - Id, title, revenue, budget , 55
            _dbContext.Set <T>().Add(entity);
            await _dbContext.SaveChangesAsync();

            return(entity);
        }