private Dictionary <int, ExtremumGroup> GetExtremumGroupsMap(int assetId, int timeframeId) { _repository = new EFTrendlineRepository(); Dictionary <int, ExtremumGroup> map = new Dictionary <int, ExtremumGroup>(); foreach (var dto in _repository.GetExtremumGroups(assetId, timeframeId)) { var eg = ExtremumGroup.FromDto(dto); map.Add(eg.ExtremumGroupId, eg); } return(map); }
public IEnumerable <ExtremumGroup> GetExtremumGroups(int assetId, int timeframeId) { _repository = new EFTrendlineRepository(); return(_repository.GetExtremumGroups(assetId, timeframeId).Select(dto => ExtremumGroup.FromDto(dto))); }