예제 #1
0
        public ActionResult ImportDB()
        {
            _rep = new YC.Repository.OpenDataRepository();
            var datas = _rep.FindFromOpenData();

            datas.ToList().ForEach(x =>
            {
                _rep.Create(x);
            });
            return(Content("OK"));
        }
예제 #2
0
        static void Main(string[] args)
        {
            var t = YC.Shared.Utils.GetDataPath();


            //組員1
            _rep = new YC.Repository.OpenDataRepository();

            var datas = _rep.FindFromOpenData().OfType <YC.Models.OpenData>().ToList();



            Console.WriteLine(string.Format("新增{0}筆OpenData:開始", datas.Count));
            datas.ForEach(x =>
            {
                _rep.Create(x);
            });
            Console.WriteLine(string.Format("新增OpenData:結束"));

            Console.ReadKey();
        }