예제 #1
0
 public virtual void Delete(TEntity entityToDelete)
 {
     if (context.Entry(entityToDelete).State == EntityState.Detached)
     {
         dbSet.Attach(entityToDelete);
     }
     dbSet.Remove(entityToDelete);
 }
예제 #2
0
 public void Edit(Publisher entity)
 {
     context.Entry(entity).State = EntityState.Modified;
 }
예제 #3
0
 public void Edit(UserType entity)
 {
     context.Entry(entity).State = EntityState.Modified;
 }
예제 #4
0
 public void Edit(Book entity)
 {
     context.Entry(entity).State = EntityState.Modified;
 }
예제 #5
0
 public void Edit(Product entity)
 {
     context.Entry(entity).State = EntityState.Modified;
 }