public virtual TEntity Atualizar(TEntity obj) { var entry = Db.Entry(obj); DbSet.Attach(obj); entry.State = EntityState.Modified; return(obj); }
public void Update(TEntity obj) { Db.Entry(obj).State = EntityState.Modified; Db.SaveChanges(); }