예제 #1
0
 public void Add(T entity)
 {
     _context.Entry(entity).State = EntityState.Added;
     _context.SaveChanges();
 }
예제 #2
0
 public void Delete(T entity)
 {
     _db.Entry(entity).State = EntityState.Deleted;
 }