コード例 #1
0
        public Map Get(double west, double east, double south, double north)
        {
            Map viewModel = new Map {
                Type = "FeatureCollection"
            };

            var list = _bus.Get();

            viewModel.Features = list
                                 .Where(x => x.Longitude >= west && x.Longitude <= east && x.Latitude >= south && x.Latitude <= north)
                                 .OrderByDescending(x => x.DateCreate)
                                 .Select(x => BuildFeature(x))
                                 .ToList();

            return(viewModel);
        }
コード例 #2
0
 // GET: api/Messages
 public IEnumerable <MessageDto> Get(string search)
 {
     return(_bus.Get(search));
 }