Beispiel #1
0
 public void Delete(T entity)
 {
     using (ERPEntities entities = new ERPEntities())
     {
         entities.Entry(entity).State = EntityState.Deleted;
         entities.SaveChanges();
     }
 }
Beispiel #2
0
 public void Update(T entity)
 {
     using (ERPEntities entities = new ERPEntities())
     {
         entities.Entry(entity).State = EntityState.Modified;
         entities.SaveChanges();
     }
 }