dhl:EF4.0中Entities执行sql语句

private TaoXueDBEntities _TaoXueDBEntities = new TaoXueDBEntities();

        public IList<Lesson> GetAllLesson()
        {
            var query = _TaoXueDBEntities.ExecuteStoreQuery<Lesson>("SELECT * FROM  dbo.Lesson");
             return query.ToList();
        }

posted @ 2010-09-16 10:23  肚肚  阅读(751)  评论(1编辑  收藏  举报