目标是检索已经使用其NavigationProperties加载的对象:
即使在OData网址上通知$expand
,也未加载导航属性!
如果您尝试导航到该属性,则会显示错误!
类
public class Regional : EntityNome
{
public virtual ICollection<Pessoa> Contatos { get; set; }
}
配置
modelBuilder.EntitySet<Regional>("regionais");
modelBuilder.EntitySet<Pessoa>("pessoas");
Microsoft.AspNet.WebApi - &gt; 5.0.0-beta1-130514
Microsoft.AspNet.WebApi.Client - &gt; 5.0.0-beta1-130514
Microsoft.AspNet.WebApi.Core - &gt; 5.0.0-beta1-130514
Microsoft.AspNet.WebApi.OData - &gt; 5.0.0-beta1-130514
Microsoft.AspNet.WebApi.Web ... - &gt; 5.0.0-beta1-130514