예제 #1
0
        public P_fxrates_update[] GetfxratesLastUpdate()
        {
            var db = new DataClasses1DataContext();
            CultureInfo culture;
            culture = new CultureInfo("en-Us", false);
            // var query = (from temp in db.sp_GetFxRateLastUpdate()
            var query = from temp in db.sp_GetFxRateLastUpdate()
                        select new P_fxrates_update
                        {
                            Day = temp.Date.Value.ToString("dd/MM/yyyy", culture),
                            Update = Convert.ToString(temp.Update),
                            Time = temp.Time
                        };

            // Context.Cache.Insert("GetfxratesLastUpdate", query.ToArray<P_fxrates_update>(), null, DateTime.Now.AddSeconds(CacheTime), TimeSpan.Zero);

            return query.ToArray();
            //return query.ToArray<P_fxrates_update>();
        }