小编use*_*133的帖子

list.AddRange无法隐式转换类型'void'

   namespace SubscriptionWebsite.PlaceHolders
{
    public class TreeData
    {
        public int ID { get; set; }
        public int? ParentLocationID { get; set; }
        public string name { get; set; }
        public int? Locationlevel { get; set; }
        public string participation { get; set; }
    }
}


namespace SubscriptionWebsite.Managers
{
    public class TreeDataManager
    {
        SubscriptionWebsite.Entities.acc_core_dbEntities db = new SubscriptionWebsite.Entities.acc_core_dbEntities();

        public List<TreeData> GetTreeData()
        {
            List<TreeData> Location = db.frm_location.Where(x => !x.Removed && x.Revision == 0).Select(loc => new TreeData
               {
                   ID = loc.ID,
                   ParentLocationID = loc.ParentLocationID, …
Run Code Online (Sandbox Code Playgroud)

c# list void addrange

3
推荐指数
1
解决办法
3249
查看次数

标签 统计

addrange ×1

c# ×1

list ×1

void ×1