//used to delete OpeningHours from database if they are no longer used public bool RemoveOpeningHours(OpeningHours openingHours) { var openingHoursToRemove = Enumerable.FirstOrDefault <OpeningHours>(_hallRepository.OpeningHours(), o => o.OpeningHoursId == openingHours.OpeningHoursId); if (openingHoursToRemove != null) { return(_hallRepository.RemoveOpeningHours(openingHoursToRemove)); } else { return(false); } }