public IEnumerable <HotSpotView> QueryHotSpotViews() { var results = _repository.GetAllList(x => x.InfrastructureType == InfrastructureType.HotSpot) .MapTo <IEnumerable <HotSpotView> >(); return(results); }
public IEnumerable <AreaBoundaryView> GetAreaBoundaryViews() { var areaDefs = _infrastructureRepository.GetAllList(x => x.HotspotType == HotspotType.AreaDef); return(areaDefs.Select(area => { var coor = _boundaryRepository.FirstOrDefault(x => x.TownId == area.Id); if (coor == null) { return null; } return new AreaBoundaryView { AreaName = area.HotspotName, AreaType = area.InfrastructureType.GetEnumDescription(), BoundaryGeoPoints = coor.CoorList() }; }).Where(x => x != null)); }