//================================================================================ private void validateUnit(GoodUnit unit, IGoodUnitDomainService goodUnitDomainService) { if (unit == null) throw new BusinessRuleException("", "Unit must be selected."); if (goodUnitDomainService.Get(unit.Id) == null) throw new ObjectNotFound("Unit", unit.Id); }