public void insertBug(Bug bug) { BugValidator vali = new BugValidator(); vali.Validate(bug); Bug inserted = bugsRepo.Save(bug); if (inserted == null) { throw new ServiceException("Bug was not added!"); } }