Beispiel #1
0
        public virtual async Task <T> UpdateAsync(T entity)
        {
            _dbContext.Entry(entity).State = EntityState.Modified;
            await _dbContext.SaveChangesAsync();

            return(entity);
        }
Beispiel #2
0
        public virtual async Task <T> UpdateAsync(T entity)
        {
            // Disconnected way of doing things
            // Movie - Id, title, revenue, budget, 55
            _dbContext.Entry(entity).State = EntityState.Modified;
            await _dbContext.SaveChangesAsync();

            return(entity);
        }