public ServiceType SelectServiceTypeById(int empId) { try { ServiceType returnedEntity; using (var repository = new ServiceTypeRepository()) { returnedEntity = repository.SelectById(empId); //if (returnedEntity != null) //returnedEntity.NetSalary = GetNetSalary(returnedEntity.GrossSalary, returnedEntity.Age); } return(returnedEntity); } catch (Exception ex) { //Log exception error _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true); throw new Exception("BusinessLogic:ServiceTypeBusiness::SelectServiceTypeById::Error occured.", ex); } }