/// <summary> /// Get Alerts by productId /// </summary> /// <param name="productId"></param> /// <returns></returns> public IEnumerable <Alert> GetAlertsByProduct(int productId) { _logger.LogInformation($"BEGIN GetAlertsByProduct"); try { return(MapAlerts(_alertRepository.GetAlertsByProduct(productId))); } catch (Exception ex) { _logger.LogError($"Exception on GetAlertsByProduct with message: {ex.Message}"); return(null); } }