SQLite多表查询 扩展属性取值

/// <summary>
        ///获得多个数据到St扩展属性udens类的
        /// </summary>
        /// <param name="classId"></param>
        /// <returns></returns>
        public List<Students> GetStuList(int classId)
        {
            //根据ClassId从StudentClass中取ClassName,并给Student类中的扩展属性ClassName
            return Db.Queryable<Students, StudentClass>((stu, stuClass) => new object[] { JoinType.Inner, stu.ClassId == stuClass.ClassId })
                .Where(stu => stu.ClassId == classId).Select((stu,stuClass)=>new Students() {StudentName=stu.StudentName.SelectAll(), ClassName=stuClass.ClassName }).ToList();
        }

 

上一篇:java案例代码11-学生类的录入,查询,对象的封装


下一篇:windows api学习笔记-用临界区对象使线程同步