Beispiel #1
0
        public Task UpdateAsync(T entity)
        {
            T exist = _dbContext.Set <T>().Find(entity.Id);

            _dbContext.Entry(exist).CurrentValues.SetValues(entity);
            return(Task.CompletedTask);
        }
 public Task UpdateAsync(T entity)
 {
     _dbContext.Attach(entity);
     _dbContext.Entry(entity).State = EntityState.Modified;
     return(Task.CompletedTask);
 }
Beispiel #3
0
 public Task UpdateAsync(T entity)
 {
     _dbContext.Entry(entity).CurrentValues.SetValues(entity);
     return(Task.CompletedTask);
 }