【发布时间】:2017-08-22 16:16:13
【问题描述】:
当我尝试选择并计入匿名类型时,我在使用 Entity Framework Core 1.1 时遇到了一些问题
错误:InvalidOperationException:未提供所需的值 参数“_outer_ProductCategoryID”。
代码:
rets = context.ProductCategories.Select
(
y => new ProductCategory
{
Title = y.Title,
ProductCategoryID = y.ProductCategoryID,
ProductCount = y.ProductCategoryFiles.Count()
}
).ToList();
【问题讨论】:
-
同样的问题,似乎可能是 ef 核心限制。
标签: parameters entity-framework-core outer-join anonymous