问题描述
我有两张这样的桌子 -
metrics.put(metric.name,array({ 9999,0 }));
和公司 -
public class Job
{
public int Id { get; set; }
public string Name { get; set; }
public DateTime AddedTime { get; set; } = DateTime.Now;
public DateTime LastEdit { get; set; } = DateTime.Now;
public string Explanation { get; set; }
public string PhotoString { get; set; }
public bool isActive { get; set; } = true;
public int CompanyId { get; set; }
public Company Company { get; set; }
}
我只想从 public class Company
{
public int Id { get; set; }
public string Name { get; set; }
public string Address { get; set; }
public string Explanation { get; set; }
public string Email { get; set; }
public string PhoneNumber { get; set; }
public string PhotoString { get; set; }
public bool isActive { get; set; } = true;
public int AppUserId { get; set; }
public AppUser AppUser { get; set; }
public List<Job> Jobs { get; set; }
}
中获取 AppUserId
以及从每个 Company
中获取所有 Jobs
。我试过这个,但它给了我错误。
Company
解决方法
m4
将整个实体添加到输出中。要仅添加一个属性,请使用 Include
,例如
Select