我有以下课程:
public partial class Application
{
public Application()
{
this.TestAccounts = new List<TestAccount>();
}
public int ApplicationId { get; set; }
public string Name { get; set; }
public virtual ICollection<TestAccount> TestAccounts { get; set; }
}
public partial class TestAccount
{
public TestAccount()
{
this.Subjects = new List<Subject>();
}
public int TestAccountId { get; set; }
public string Name { get; set; }
public int ApplicationId { get; set; }
}
在我的代码中,我有以下返回IQueryable<Application>
一条记录。
var applications = DbSet.Where(a => a.ApplicationId == applicationId)
如何更改它以使其返回:ICollection<TestAccount>