我需要返回一个List,但是找不到这样做的方法。这是一个必须返回List<BookItem>的ASP.NET核心Crud方法。在这个方法中,搜索部分工作正常,我想我得到了一个包含字符串的IEnumerable<XElement>列表。必须将var query转换为IActionResultList<BookItem> [HttpGet("title/{title}")]
public IActi
IEnumerable<XElement> world1 = LevelData.root.”类型转换为“System.Collection s.Generic.List>”。List<IEnumerable<XElement>>[] World = new List<IEnumerable<XElement>>[noofworlds];
XElement rootElement = XElement.Load(@"E:\Samples\TestConsole\TestConsoleApp\TestConsoleApp\XMLFile1.xml");
IEnumerable<XElement> lv1s = from lv1 in rootElement.Descendants("A")Cannot implicitly convert type 'System.Collectio