Example #1
0
        public virtual TEntity Atualizar(TEntity obj)
        {
            var entry = Db.Entry(obj);

            DbSet.Attach(obj);
            entry.State = EntityState.Modified;

            return(obj);
        }
Example #2
0
 public void Update(TEntity obj)
 {
     Db.Entry(obj).State = EntityState.Modified;
     Db.SaveChanges();
 }