0
我正在嘗試在RIA服務中使用NHibernate。目前我有兩個實體:Ria服務未在客戶端填充複雜屬性
public class Person{
[Key]
public virtual int Id {get; set;}
[Include]
[Association("CurrentEmployer", "CurrentEmployerId", "Id", IsForeignKey = true)]
public virtual Employer CurrentEmployer { get;set;}
public virtual int? CurrentEmployerId {get;set;}
}
public class Employer{
[Key]
public virtual int Id {get;set;}
public virtual string Name {get;set;}
}
當我通過利雅得到一個人的實體上CurrentEmployerId
設置客戶端,但CurrentEmployer
仍然是空。在服務器端,CurrentEmployerId
和CurrentEmployer
都已正確填充。 Employer
實體和Person
實體都在相同的域服務中公開。
當我找到一個人時,我如何在客戶端填充CurrentEmployer
?我錯過了一個屬性?