return list with anonymous type in entity framework

后端 未结 6 1471
北恋
北恋 2021-01-02 07:21

How i can return list with anonymous type, because with this code i get

\"The type or namespace name \'T\' could not be found (are you missing a using directive or a

6条回答
  •  孤城傲影
    2021-01-02 08:08

    Just use and ArrayList instead

        public static ArrayList GetMembersItems(string ProjectGuid)
        {
            ArrayList items = new ArrayList(); 
    
                  items.AddRange(yourVariable 
                            .Where(p => p.Knowledge_Project.Guid == ProjectGuid)
                            .ToList());
                return items;
        }
    

提交回复
热议问题