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