예제 #1
0
        private void btnLite_Click(object sender, EventArgs e)
        {
            using (stockdbaEntitiesLite db = new stockdbaEntitiesLite())
            {
                db.DailyDetail.Add(new DailyDetail()
                {
                    receiveDate = DateTime.Now,
                    stockId     = "9999",
                    no          = 1,
                    brokerId    = "xxxx"
                });

                db.SaveChanges();

                db.Configuration.ProxyCreationEnabled = false;
                var obj = (from a in db.DailyDetail.Where(o => o.brokerId == "xxxx") select a).Take(100);
                dataGridView1.DataSource = obj.ToList();
            }
        }
예제 #2
0
        private void btnLite_Click(object sender, EventArgs e)
        {
            using (stockdbaEntitiesLite db = new stockdbaEntitiesLite())
            {
                db.DailyDetail.Add(new DailyDetail()
                {
                    receiveDate = DateTime.Now,
                    stockId = "9999",
                    no = 1,
                    brokerId = "xxxx"
                });

                db.SaveChanges();

                db.Configuration.ProxyCreationEnabled = false;
                var obj = (from a in db.DailyDetail.Where(o=>o.brokerId == "xxxx") select a).Take(100);
                dataGridView1.DataSource = obj.ToList();
            }
        }