public class CourseDocument
{
public ObjectId _id { get; set; }
public string Name { get; set; }
public List<StudentObject> StudentAccess { get; set; }
public string EcosystemId { get; set; }
public CourseDocument()
{
StudentAccess = new List<StudentObject>();
}
}
public class StudentObject
{
public long UserID { get; set; }
public long CluKey { get; set; }
}
....在我正在调用的api方法中
var query = await _db.CourseDocuments.FindAsync(w => w.EcosystemId == acc.Identifier);
此后,我得到错误消息“反序列化班级BankerCoreApi.Models.Courses.CourseDocument类的StudentAccess属性时发生错误:无法反序列化BsonType'Document'中的'List'。”