public void Remove(Term term) { if (term == null) { throw new ArgumentNullException("term"); } if (term.Offerings.Count > 0) { throw new ForeignKeyEntityException("The term could not be removed. It has one or more offerins associated with it."); } PeriodDateService.RemoveRange(term.PeriodDates); _termRepository.Remove(term); }