예제 #1
0
 public void Edit(T entity)
 {
     using (var context = new ParentControlContext(configuration))
     {
         context.Entry(entity).State = EntityState.Modified;
         context.SaveChanges();
     }
 }
예제 #2
0
 public void Delete(T entity)
 {
     using (var context = new ParentControlContext(configuration))
     {
         context.Set <T>().Remove(entity);
         context.SaveChanges();
     }
 }