コード例 #1
0
        public async Task <IHttpActionResult> GetObservation(decimal latitude, decimal longitude)
        {
            try
            {
                var observation = await _weatherDataService.GetWeatherObservationAsync(latitude, longitude);

                return(Ok(observation));
            }
            catch
            {
                return(InternalServerError(new Exception("No observation found.")));
            }
        }