我有以下关系
public partial class SharedResource : DomainEntity
{
public System.Guid Id { get; set; }
public System.Guid VersionId { get; set; }
public virtual PackageVersion PackageVersion { get; set; } // tried it noth with and without virtual
}
现在,我使用加载 SharedResource
SharedResource sharedResource = Get(shareKey)
和
sharedResource.PackageVersion == null.
虽然 VersionId 不为 null 并且
context.Configuration.LazyLoadingEnabled = false;
我必须做什么才能加载它