public IList <Alert> GetPendingAlertsByPriority(int id) { List <Alert> result = new List <Alert>(); try { var repository = new AlertRepository(); result = repository.GetPendingAlertsByPriority(id).ToList(); } catch (Exception ex) { new Logger("Error in AlertsController - GetPendingAlertsByPriority(): " + ex.Message, ex); throw; } return(result); }