Class 如何从数据库获取数据并设置为嵌套列表<;对象>;

Class 如何从数据库获取数据并设置为嵌套列表<;对象>;,class,view,nested,Class,View,Nested,我有一个嵌套的列表: 公共类项目问题{ 公共字符串项_title{get;set;} 公共字节项_type{get;set;} 公共字符串项_图像{get;set;} 公共Int16项_等级{get;set;} } 带有{u项的公共类Questins_ 公共字符串问题_title{get;set;} 公共列表项{get;set;} } 我从数据库获取数据并设置为列表, 但我得到了这个错误: 匹配的最佳重载方法 'System.Collections.Generic.List.Add(grap

我有一个嵌套的
列表

公共类项目问题{
公共字符串项_title{get;set;}
公共字节项_type{get;set;}
公共字符串项_图像{get;set;}
公共Int16项_等级{get;set;}
} 
带有{u项的公共类Questins_
公共字符串问题_title{get;set;}
公共列表项{get;set;}
}
我从数据库获取数据并设置为列表, 但我得到了这个错误:

匹配的最佳重载方法 'System.Collections.Generic.List.Add(graph1.ViewModels.ItemsOfQuestions)' 有一些无效的参数


有人能帮忙吗?

我的列表是:公共类项目问题{公共字符串项目{title{get;set;}公共字节项目{type{get;set;}公共字符串项目{image{get;set;}公共Int16项目{grade{get;set;}公共类项目{u{public string question_title{get;set;}public List List_items{get;set;}请编辑您的问题以包含两个源代码(在您的评论中几乎不可读)并显示有关数据库查询的更多信息。我们无法读懂您或您的计算机的想法。了解您使用的语言和系统会很有帮助。
public class ItemsOfQuestions { 
    public string item_title { get; set; } 
    public Byte item_type { get; set; } 
    public string item_image { get; set; } 
    public Int16 item_grade { get; set;}
} 
public class Questins_With_Items { 
    public string question_title { get; set; } 
    public List<ItemsOfQuestions> list_items { get; set; } 
}