public virtual void UpdateOnlyTask(TASK entityToUpdate) { var local = context.Set <TASK>().Local.FirstOrDefault(f => f.PK_ID_TASK == entityToUpdate.PK_ID_TASK); if (local != null) { context.Entry(local).State = EntityState.Detached; } context.Entry(entityToUpdate).State = EntityState.Modified; }
public GenericRepository(TRANSCODEREntities context) { this.context = context; this.dbSet = context.Set <TEntity>(); }