public void Add(T entity) { _context.Entry(entity).State = EntityState.Added; _context.SaveChanges(); }
public void Delete(T entity) { _db.Entry(entity).State = EntityState.Deleted; }