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(); }
标签:ClassId,SQLite,StudentName,多表,stuClass,ClassName,stu,new,取值 来源: https://www.cnblogs.com/engineer2021/p/15487220.html