我有 2 节课:
public class Employee
{
public int Id {get;set;}
public string Name {get;set;}
}
public class Remuneration
{
public int Id {get;set;}
public Employee Employee {get;set;}
public int Amount {get;set;}
}
正常查询:
return _context.Remunerations.Include("Employee")
完美运行
但是当我使用 Albahari 的 LinqKit 并给出如下查询时:
return _context.Remunerations.AsExpandable().Include("Employee")
它在那里没有给出任何错误。
但结果中不包括 Employee 数据。