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();
        }

你可能感兴趣的:(sql语句)