public IActionResult GetByReference(string propertyReference) { _logger.LogInformation("Property information was requested for " + propertyReference); var result = _getPropertyUseCase.Execute(propertyReference); if (result.Success) { return(Ok(result.Property)); } return(NotFound()); }
public IActionResult GetByReference(string propertyReference) { try { _logger.LogInformation("Property information was requested for " + propertyReference); var response = _getProperty.Execute(propertyReference); return(Ok(response)); } catch (PropertyNotFoundException e) { return(NotFound(e.Message)); } }