public virtual void Atualizar(TEntity obj) { var entry = Db.Entry(obj); DbSet.Attach(obj); entry.State = EntityState.Modified; }
public void Update(Product product) { //_context.Update(product); _context.Entry(product).State = EntityState.Modified; }