public IEnumerable <API_LIST_LOAD_UNIT_CONDITIONS_Result> GetAnomalies(int?retailerChainId) { var repo = new AnomalyRepository(); var result = repo.GetAnomalies(retailerChainId).ToList(); foreach (var anomaly in result) { var label = anomaly.LOAD_UNIT_CONDITION_LABEL; label = label.Substring(label.IndexOf('-') + 1).Trim(); anomaly.LOAD_UNIT_CONDITION_LABEL = label; } return(result); }
public AnomalyController() { api = new AnomalyRepository(); table = new TableRepository(); }