public virtual TEntity Atualizar(TEntity obj) { _dbSet.Attach(obj); Db.Entry(obj).State = EntityState.Modified; return(obj); }
public void Put(int id, [FromBody] Bridge bridge) { bridge.BridgeId = id; _db.Entry(bridge).State = EntityState.Modified; _db.SaveChanges(); }