コード例 #1
0
        public IEnumerable <ActivityViewModel> GetActivitiesByLocation(double latitude, double longitude, int miles)
        {
            List <ActivityViewModel> ret = new List <ActivityViewModel>();

            var activities = _allReadyDataAccess.ActivitiesByGeography(latitude, longitude, miles);

            foreach (Activity activity in activities)
            {
                ret.Add(new ActivityViewModel(activity));
            }

            return(ret);
        }
コード例 #2
0
 public List <Models.Activity> Handle(ActivitiesByGeographyQuery message)
 {
     return(dataAccess.ActivitiesByGeography(message.Latitude, message.Longitude, message.Miles).ToList());
 }