Ejemplo n.º 1
0
        public static Town FromGridRef(GridRef input)
        {
            if (input == null)
            {
                return(null);
            }

            Sproc sp = new Sproc("Geonames_S_FindName", _database);

            sp.Parameters.Add("@Latitude", SqlDbType.Float).Value  = input.Latitude;
            sp.Parameters.Add("@Longitude", SqlDbType.Float).Value = input.Longitude;

            return(sp.ExecuteObject <IPlace>(FromDataRecord) as Town);
        }