public List<MapPoint> GetDonationsByCountry(MapPoint northwest, MapPoint southeast)
 {
     return GetDonationLocations("dbo.GetDonationsByCountry", northwest, southeast);
 }
 private List<MapPoint> GetDonationLocations(string sproc, MapPoint northwest, MapPoint southeast)  
 {            
     using (var db = new DataAccess())
     {
         db.CreateStoredProcCommand(sproc);
         db.AddInputParameter("@NwLat", DbType.Double, northwest.Latitude);
         db.AddInputParameter("@NwLng", DbType.Double, northwest.Longitude);
         db.AddInputParameter("@SeLat", DbType.Double, southeast.Latitude);
         db.AddInputParameter("@SeLng", DbType.Double, southeast.Longitude);
         try
         {
             var points = new List<MapPoint>();
             db.ReadInto(points);
             return points;
         }
         catch (Exception ex)
         {
             Log.Error("Error while searching donations.", ex);
             throw;
         }
     }  
 }
        public JsonResult Locations(ZoomLevel? zoom) 
        {
            var p1 = new MapPoint(null, null);
            List<MapPoint> model;
            switch (zoom)
            {
                case ZoomLevel.City:
                    model = _donationRepository.GetDonationsByCity(p1, p1);
                    break;

                case ZoomLevel.State:
                    model = _donationRepository.GetDonationsByState(p1, p1);
                    break;

                case ZoomLevel.Country:
                default:
                    model = _donationRepository.GetDonationsByCity(p1, p1);
                    break;
            }
            return Json(model, JsonRequestBehavior.AllowGet);
        }