public Task CompleteTask(Task task) { task.Finished = true; _dbSet.Attach(task); _dbContext.Entry(task).State = EntityState.Modified; return(task); }
public virtual void Update(TEntity entity) { DBSet.Attach(entity); DBContext.Entry(entity).State = EntityState.Modified; //_dbContext.Entry(entity).State = EntityState.Modified; }