public void Update(T entity) { _dbSet.Attach(entity); _dataDbContext.Entry(entity).State = EntityState.Modified; Save(); }
public void Update(T entity) { dbContext.Entry(entity).State = System.Data.Entity.EntityState.Modified; }
public bool InsertAttach(T t) { if (t != null) { DbSet.Attach(t); BaseContext.Entry(t).State = EntityState.Added; return(Save()); } return(_flag); }
public void Update(TEntity item) { _context.Entry(item).State = EntityState.Modified; _context.SaveChanges(); }
public void Update(T entity) { dbContext.Entry(entity).State = EntityState.Modified; Save(); }
/// <summary> /// Új elem hozzáadása. /// </summary> /// <param name="entityToAdd"></param> public void Add(TEntity entityToAdd) { Context.Set <TEntity>().Add(entityToAdd); Context.Entry <TEntity>(entityToAdd).State = EntityState.Added; SaveChanges(); }