Пример #1
0
        /// <summary>
        /// 取得藝文館所
        /// </summary>
        /// <param name="lat">緯度</param>
        /// <param name="lng">經度</param>
        /// <param name="locationRadius">半徑範圍</param>
        /// <returns></returns>
        public static IList <ArtsMuseumEntity> Get(float lat, float lng, int locationRadius = 1)
        {
            IList <ArtsMuseumEntity> list = null;

            using (var openData = new ArtsMuseum())
            {
                var table = openData.GetByLatLng(lat, lng, locationRadius);

                list = table.ToList <ArtsMuseumEntity>();
            }

            return(list);
        }
Пример #2
0
        /// <summary>
        /// 取得藝文館所
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns></returns>
        public static ArtsMuseumEntity Get(int venuesId)
        {
            ArtsMuseumEntity entity = null;

            using (var openData = new ArtsMuseum())
            {
                var table = openData.GetById(venuesId);

                entity = table.ToList <ArtsMuseumEntity>().FirstOrDefault();
            }

            return(entity);
        }