Beispiel #1
0
        public Park GetPark(string parkCode)
        {
            try
            {
                using (SqlConnection conn = new SqlConnection(connectionString))
                {
                    conn.Open();

                    Park park = conn.QueryFirstOrDefault <Park>(SQL_GetParkByParkCode, new { parkCode = parkCode });
                    park.fiveDaysWeather = weatherDal.GetFiveDaysWeather(park.ParkCode);
                    return(park);
                }
            }
            catch (SqlException ex)
            {
                throw;
            }
        }