我的方法中的显式转换需要同时传递参数
params Expression<Func<TEntity, IQueryable<TEntity>>>[] included
作为参数应用。后来又使用它们以这种方式:
IQueryable<TEntity> query = dbSet;
if(included!=null)
{
foreach(var z in included)
{
query.Include(z);
}
}
但是我不能打电话,因为在此调用抛出一个错误的此功能:
Get(w=>w.Device, w=>w.DeviceUsage));
错误10无法隐式转换类型' magazyn.Models.Device'到 'System.Linq.IQueryable'。存在明确的 转换(您是否缺少演员?)
如何修改呼叫以传递这两个参数?
您'Device'或'DeviceUsage'属性不是'IQueryable'。 –
Maarten