Exemplo n.º 1
0
        public void Update(TEntity entity)
        {
            var entry = _context.Entry(entity);

            if (entry.State == EntityState.Detached)
            {
                Set.Attach(entity);
                entry = _context.Entry(entity);
            }
            entry.State = EntityState.Modified;
        }
Exemplo n.º 2
0
 public void Update(Order book)
 {
     context.Entry(book).State = EntityState.Modified;
 }